![]() |
![]() |
![]() |
adg-1 reference manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <adg-1/adg.h> struct AdgLDim; struct AdgLDimClass; AdgLDim * adg_ldim_new (void
); AdgLDim * adg_ldim_new_full (const CpmlPair *ref1
,const CpmlPair *ref2
,const CpmlPair *pos
,gdouble direction
); AdgLDim * adg_ldim_new_full_explicit (gdouble ref1_x
,gdouble ref1_y
,gdouble ref2_x
,gdouble ref2_y
,gdouble pos_x
,gdouble pos_y
,gdouble direction
); AdgLDim * adg_ldim_new_full_from_model (AdgModel *model
,const gchar *ref1
,const gchar *ref2
,const gchar *pos
,gdouble direction
); void adg_ldim_set_direction (AdgLDim *ldim
,gdouble direction
); gdouble adg_ldim_get_direction (AdgLDim *ldim
); void adg_ldim_switch_extension1 (AdgLDim *ldim
,gboolean new_state
); gboolean adg_ldim_has_extension1 (AdgLDim *ldim
); void adg_ldim_switch_extension2 (AdgLDim *ldim
,gboolean new_state
); gboolean adg_ldim_has_extension2 (AdgLDim *ldim
);
"direction" gdouble : Read / Write / Construct "has-extension1" gboolean : Read / Write "has-extension2" gboolean : Read / Write
struct AdgLDim;
All fields are private and should not be used directly. Use its public methods instead.
Since 1.0
AdgLDim * adg_ldim_new (void
);
Creates a new - undefined - linear dimension. You must, at least,
define the start of the dimension in "ref1", the end in
"ref2" and the position of the quote in "pos" using
any valid AdgDim method. The director of the dimension (that is,
if it is horizontal, vertical or oblique at a specific angle)
should be specified with adg_ldim_set_direction()
.
Returns : |
the newly created linear dimension entity |
Since 1.0
AdgLDim * adg_ldim_new_full (const CpmlPair *ref1
,const CpmlPair *ref2
,const CpmlPair *pos
,gdouble direction
);
Creates a new linear dimension, specifing all the needed properties in one shot.
|
the first reference point. [allow-none] |
|
the second reference point. [allow-none] |
|
the position reference. [allow-none] |
|
angle where to extend the dimension |
Returns : |
the newly created linear dimension entity |
Since 1.0
AdgLDim * adg_ldim_new_full_explicit (gdouble ref1_x
,gdouble ref1_y
,gdouble ref2_x
,gdouble ref2_y
,gdouble pos_x
,gdouble pos_y
,gdouble direction
);
Wrappes adg_ldim_new_full()
with explicit values.
|
the x coordinate of the first reference point |
|
the y coordinate of the first reference point |
|
the x coordinate of the second reference point |
|
the y coordinate of the second reference point |
|
the x coordinate of the position reference |
|
the y coordinate of the position reference |
|
angle where to extend the dimension |
Returns : |
the newly created linear dimension entity |
Since 1.0
AdgLDim * adg_ldim_new_full_from_model (AdgModel *model
,const gchar *ref1
,const gchar *ref2
,const gchar *pos
,gdouble direction
);
Creates a new linear dimension, specifing all the needed properties in
one shot and using named pairs from model
.
|
the model from which the named pairs are taken. [transfer none] |
|
the first reference point. [allow-none] |
|
the second reference point. [allow-none] |
|
the position reference. [allow-none] |
|
angle where to extend the dimension |
Returns : |
the newly created linear dimension entity |
Since 1.0
void adg_ldim_set_direction (AdgLDim *ldim
,gdouble direction
);
Sets the direction angle where to extend ldim
.
direction
is normalized by cpml_angle()
before being used.
|
an AdgLDim entity |
|
an angle value, in radians |
Since 1.0
gdouble adg_ldim_get_direction (AdgLDim *ldim
);
Gets the direction where ldim
will extend.
|
an AdgLDim entity |
Returns : |
the direction angle in radians |
Since 1.0
void adg_ldim_switch_extension1 (AdgLDim *ldim
,gboolean new_state
);
Shows (if new_state
is TRUE
) or hide (if new_state
is FALSE
)
the first extension line of ldim
.
|
an AdgLDim entity |
|
the new state |
Since 1.0
gboolean adg_ldim_has_extension1 (AdgLDim *ldim
);
Checks if ldim
should render also the first extension line.
|
an AdgLDim entity |
Returns : |
TRUE on first extension line presents, FALSE otherwise |
Since 1.0
void adg_ldim_switch_extension2 (AdgLDim *ldim
,gboolean new_state
);
Shows (if new_state
is TRUE
) or hide (if new_state
is FALSE
)
the second extension line of ldim
.
|
an AdgLDim entity |
|
the new new_state |
Since 1.0
"direction"
property "direction" gdouble : Read / Write / Construct
The inclination angle of the extension lines.
Allowed values: [-3.14159,3.14159]
Default value: 0
"has-extension1"
property "has-extension1" gboolean : Read / Write
Show (TRUE) or hide (FALSE) the first extension line.
Default value: TRUE