![]() |
![]() |
![]() |
adg-1 reference manual |
![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct AdgADim; struct AdgADimClass; AdgPoint * adg_adim_get_org1 (AdgADim *adim
); AdgPoint * adg_adim_get_org2 (AdgADim *adim
);gboolean adg_adim_has_extension1 (AdgADim *adim
);gboolean adg_adim_has_extension2 (AdgADim *adim
); AdgADim * adg_adim_new (void
); AdgADim * adg_adim_new_full (const AdgPair *ref1
,const AdgPair *ref2
,const AdgPair *org1
,const AdgPair *org2
,const AdgPair *pos
); AdgADim * adg_adim_new_full_explicit (,
gdouble ref1_x,
gdouble ref1_y,
gdouble ref2_x,
gdouble ref2_y,
gdouble org1_x,
gdouble org1_y,
gdouble org2_x,
gdouble org2_y,
gdouble pos_x); AdgADim * adg_adim_new_full_from_model (
gdouble pos_yAdgModel *model
,const
,gchar *ref1const
,gchar *ref2const
,gchar *org1const
,gchar *org2const
);gchar *posvoid adg_adim_set_org1 (AdgADim *adim
,const AdgPoint *org1
);void adg_adim_set_org1_explicit (AdgADim *adim
,,
gdouble x);
gdouble yvoid adg_adim_set_org1_from_model (AdgADim *adim
,AdgModel *model
,const
);gchar *org1void adg_adim_set_org1_from_pair (AdgADim *adim
,const AdgPair *org1
);void adg_adim_set_org2 (AdgADim *adim
,const AdgPoint *org2
);void adg_adim_set_org2_explicit (AdgADim *adim
,,
gdouble x);
gdouble yvoid adg_adim_set_org2_from_model (AdgADim *adim
,AdgModel *model
,const
);gchar *org2void adg_adim_set_org2_from_pair (AdgADim *adim
,const AdgPair *org2
);void adg_adim_switch_extension1 (AdgADim *adim
,);
gboolean new_statevoid adg_adim_switch_extension2 (AdgADim *adim
,);
gboolean new_state
"has-extension1"gboolean : Read / Write "has-extension2"gboolean : Read / Write "org1" AdgPoint* : Read / Write "org2" AdgPoint* : Read / Write "value"gchar * : Read / Write / Construct
struct AdgADim;
All fields are privates and should not be used directly. Use its public methods instead.
Since 1.0
AdgPoint * adg_adim_get_org1 (AdgADim *adim
);
Gets the "org1" point. The returned point is internally owned
and must not be freed or modified. Anyway, it is not const because
adg_point_get_pair()
must be able to modify the internal cache of
the returned point.
|
an AdgADim |
Returns : |
the first reference point |
Since 1.0
AdgPoint * adg_adim_get_org2 (AdgADim *adim
);
Gets the "org2" point. The returned point is internally owned
and must not be freed or modified. Anyway, it is not const because
adg_point_get_pair()
must be able to modify the internal cache of
the returned point.
|
an AdgADim |
Returns : |
the first reference point |
Since 1.0
gboolean adg_adim_has_extension1 (AdgADim *adim
);
Checks if adim
should render the first extension line.
|
an AdgADim entity |
Returns : |
TRUE FALSE |
Since 1.0
gboolean adg_adim_has_extension2 (AdgADim *adim
);
Checks if adim
should render the second extension line.
|
an AdgADim entity |
Returns : |
TRUE FALSE |
Since 1.0
AdgADim * adg_adim_new (void
);
Creates a new - undefined - angular dimension. You must, at least, define the first line by setting "org1" (start point) and "ref1" (end point), the second line by setting "org2" (start point) and "ref2" (end point) and the position of the quote in "pos".
Returns : |
the newly created angular dimension entity |
Since 1.0
AdgADim * adg_adim_new_full (const AdgPair *ref1
,const AdgPair *ref2
,const AdgPair *org1
,const AdgPair *org2
,const AdgPair *pos
);
Creates a new angular dimension, specifing all the needed properties in one shot using AdgPair.
|
allow-none: first reference point |
|
allow-none: second reference point |
|
allow-none: first origin point |
|
allow-none: second origin point |
Returns : |
the newly created angular dimension entity |
Since 1.0
AdgADim * adg_adim_new_full_explicit (,
gdouble ref1_x,
gdouble ref1_y,
gdouble ref2_x,
gdouble ref2_y,
gdouble org1_x,
gdouble org1_y,
gdouble org2_x,
gdouble org2_y,
gdouble pos_x);
gdouble pos_y
Wrappes adg_adim_new_full()
with explicit values.
|
the x coordinate of end point of the first line |
|
the y coordinate of end point of the first line |
|
the x coordinate of end point of the second line |
|
the y coordinate of end point of the second line |
|
the x coordinate of start point of the first line |
|
the y coordinate of start point of the first line |
|
the x coordinate of start point of the second line |
|
the y coordinate of start point of the second line |
|
the x coordinate of the position reference |
|
the y coordinate of the position reference |
Returns : |
the newly created linear dimension entity |
Since 1.0
AdgADim * adg_adim_new_full_from_model (AdgModel *model
,const
,gchar *ref1const
,gchar *ref2const
,gchar *org1const
,gchar *org2const
);gchar *pos
Creates a new angular dimension, specifing all the needed properties
in one shot and using named pairs from model
.
|
transfer-none: the model from which the named pairs are taken |
|
allow-none: the end point of the first line |
|
allow-none: the end point of the second line |
|
allow-none: the origin of the first line |
|
allow-none: the origin of the second line |
|
allow-none: the position reference |
Returns : |
the newly created angular dimension entity |
Since 1.0
void adg_adim_set_org1 (AdgADim *adim
,const AdgPoint *org1
);
Sets the "org1" property to org1
. The old point
is silently discarded, unreferencing its model if that
point was bound to a named pair (hence, possibly destroying
the model if this was the last reference).
org1
can be NULL
|
an AdgADim |
|
the new point to use as first reference |
Since 1.0
void adg_adim_set_org1_explicit (AdgADim *adim
,,
gdouble x);
gdouble y
Sets the "org1" property to the (x
, y
) explicit
coordinates. The old point is silently discarded,
unreferencing its model if that point was bound to a named
pair (hence, possibly destroying the model if this was the
last reference).
|
an AdgADim |
|
x coordinate of the first reference point |
|
y coordinate of the first reference point |
Since 1.0
void adg_adim_set_org1_from_model (AdgADim *adim
,AdgModel *model
,const
);gchar *org1
Binds "org1" to the org1
named pair of model
. If model
is NULL
The assignment is lazy so org1
could be not be present in model
.
Anyway, at the first access to this point an error will be raised
if the named pair is still missing.
Since 1.0
void adg_adim_set_org1_from_pair (AdgADim *adim
,const AdgPair *org1
);
Convenient function to set the "org1" property using a pair instead of explicit coordinates.
|
an AdgADim |
|
the coordinates pair of the first reference point |
Since 1.0
void adg_adim_set_org2 (AdgADim *adim
,const AdgPoint *org2
);
Sets the "org2" property to org2
. The old point
is silently discarded, unreferencing its model if that
point was bound to a named pair (hence, possibly destroying
the model if this was the last reference).
org2
can be NULL
|
an AdgADim |
|
the new point to use as first reference |
Since 1.0
void adg_adim_set_org2_explicit (AdgADim *adim
,,
gdouble x);
gdouble y
Sets the "org2" property to the (x
, y
) explicit
coordinates. The old point is silently discarded,
unreferencing its model if that point was bound to a named
pair (hence, possibly destroying the model if this was the
last reference).
|
an AdgADim |
|
x coordinate of the first reference point |
|
y coordinate of the first reference point |
Since 1.0
void adg_adim_set_org2_from_model (AdgADim *adim
,AdgModel *model
,const
);gchar *org2
Binds "org2" to the org2
named pair of model
. If model
is NULL
The assignment is lazy so org2
could be not be present in model
.
Anyway, at the first access to this point an error will be raised
if the named pair is still missing.
Since 1.0
void adg_adim_set_org2_from_pair (AdgADim *adim
,const AdgPair *org2
);
Convenient function to set the "org2" property using a pair instead of explicit coordinates.
|
an AdgADim |
|
the coordinates pair of the first reference point |
Since 1.0
void adg_adim_switch_extension1 (AdgADim *adim
,);
gboolean new_state
Shows (if new_state
is TRUE
new_state
is FALSE
adim
.
|
an AdgADim entity |
|
the new state |
Since 1.0
"has-extension1"
property"has-extension1"gboolean : Read / Write
Show (TRUE) or hide (FALSE) the first extension line.
Default value: TRUE
"has-extension2"
property"has-extension2"gboolean : Read / Write
Show (TRUE) or hide (FALSE) the second extension line.
Default value: TRUE
"org1"
property"org1" AdgPoint* : Read / Write
Where the first line comes from: this point is used toghether with "ref1" to align the first extension line.
"org2"
property"org2" AdgPoint* : Read / Write
Where the second line comes from: this point is used toghether with "ref2" to align the second extension line.