![]() |
![]() |
![]() |
adg-1 reference manual |
![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct AdgDim; struct AdgDimClass; AdgThreeState adg_dim_get_detached (AdgDim *dim
); AdgDress adg_dim_get_dim_dress (AdgDim *dim
);gdouble adg_dim_get_level (AdgDim *dim
); constgchar * adg_dim_get_max (AdgDim *dim
); constgchar * adg_dim_get_min (AdgDim *dim
); AdgThreeState adg_dim_get_outside (AdgDim *dim
); AdgPoint * adg_dim_get_pos (AdgDim *dim
); AdgAlignment * adg_dim_get_quote (AdgDim *dim
); AdgPoint * adg_dim_get_ref1 (AdgDim *dim
); AdgPoint * adg_dim_get_ref2 (AdgDim *dim
); constgchar * adg_dim_get_value (AdgDim *dim
);gdouble adg_dim_quote_angle (AdgDim *dim
,);
gdouble anglevoid adg_dim_set_detached (AdgDim *dim
,AdgThreeState detached
);void adg_dim_set_dim_dress (AdgDim *dim
,AdgDress dress
);void adg_dim_set_level (AdgDim *dim
,);
gdouble levelvoid adg_dim_set_limits (AdgDim *dim
,const
,gchar *minconst
);gchar *maxvoid adg_dim_set_max (AdgDim *dim
,const
);gchar *maxvoid adg_dim_set_min (AdgDim *dim
,const
);gchar *minvoid adg_dim_set_outside (AdgDim *dim
,AdgThreeState outside
);void adg_dim_set_pos (AdgDim *dim
,const AdgPoint *pos
);void adg_dim_set_pos_explicit (AdgDim *dim
,,
gdouble x);
gdouble yvoid adg_dim_set_pos_from_model (AdgDim *dim
,AdgModel *model
,const
);gchar *posvoid adg_dim_set_pos_from_pair (AdgDim *dim
,const AdgPair *pos
);void adg_dim_set_ref1 (AdgDim *dim
,const AdgPoint *ref1
);void adg_dim_set_ref1_explicit (AdgDim *dim
,,
gdouble x);
gdouble yvoid adg_dim_set_ref1_from_model (AdgDim *dim
,AdgModel *model
,const
);gchar *ref1void adg_dim_set_ref1_from_pair (AdgDim *dim
,const AdgPair *ref1
);void adg_dim_set_ref2 (AdgDim *dim
,const AdgPoint *ref2
);void adg_dim_set_ref2_explicit (AdgDim *dim
,,
gdouble x);
gdouble yvoid adg_dim_set_ref2_from_model (AdgDim *dim
,AdgModel *model
,const
);gchar *ref2void adg_dim_set_ref2_from_pair (AdgDim *dim
,const AdgPair *ref2
);void adg_dim_set_value (AdgDim *dim
,const
);gchar *value
GObject +----GInitiallyUnowned +----AdgEntity +----AdgDim +----AdgADim +----AdgLDim +----AdgRDim
"detached" AdgThreeState : Read / Write "dim-dress" AdgDress : Read / Write "level"gdouble : Read / Write "max"gchar * : Read / Write "min"gchar * : Read / Write "outside" AdgThreeState : Read / Write "pos" AdgPoint* : Read / Write "ref1" AdgPoint* : Read / Write "ref2" AdgPoint* : Read / Write "value"gchar * : Read / Write / Construct
struct AdgDim;
All fields are private and should not be used directly. Use its public methods instead.
Since 1.0
struct AdgDimClass { /* Virtual Table */ gdouble (*quote_angle) (gdouble angle); gchar * (*default_value) (AdgDim *dim); };
AdgThreeState adg_dim_get_detached (AdgDim *dim
);
Gets the state of the "detached" property: check the property documentation for further details.
|
an AdgDim |
Returns : |
the current flag state. |
Since 1.0
AdgDress adg_dim_get_dim_dress (AdgDim *dim
);
Gets the dimension dress to be used in rendering dim
.
|
an AdgDim |
Returns : |
the current dimension dress. [transfer none] |
Since 1.0
gdouble adg_dim_get_level (AdgDim *dim
);
Gets the level of this dimension.
|
an AdgDim |
Returns : |
the level value. |
Since 1.0
constgchar * adg_dim_get_max (AdgDim *dim
);
Gets the maximum value text or NULL
The string is internally owned and must not be freed or modified.
|
an AdgDim |
Returns : |
the maximum value text. [transfer none] |
Since 1.0
constgchar * adg_dim_get_min (AdgDim *dim
);
Gets the minimum value text or NULL
The string is internally owned and must not be freed or modified.
|
an AdgDim |
Returns : |
the mimimum value text. [transfer none] |
Since 1.0
AdgThreeState adg_dim_get_outside (AdgDim *dim
);
Gets the state of the "outside" property: check the property documentation for further details.
|
an AdgDim |
Returns : |
the current flag state. |
Since 1.0
AdgPoint * adg_dim_get_pos (AdgDim *dim
);
Gets the "pos" point of dim
.
The returned point is internally owned and must not be freed
or modified. Anyway it is not const because a call to
adg_point_get_pair()
with the returned value must be able to
modify the internal cache.
|
an AdgDim |
Returns : |
the position point. [transfer none] |
Since 1.0
AdgAlignment * adg_dim_get_quote (AdgDim *dim
);
Gets the quote entity, if any. This function is valid only after
the AdgDim implementation of the arrange()
The returned entity is owned by dim
and should not be
modified or freed.
This function is only useful in new dimension implementations.
|
an AdgDim |
Returns : |
the quote entity. [transfer none] |
Since 1.0
AdgPoint * adg_dim_get_ref1 (AdgDim *dim
);
Gets the "ref1" point of dim
.
The returned point is internally owned and must not be freed
or modified. Anyway it is not const because a call to
adg_point_get_pair()
with the returned value must be able to
modify the internal cache.
|
an AdgDim |
Returns : |
the first reference point. [transfer none] |
Since 1.0
AdgPoint * adg_dim_get_ref2 (AdgDim *dim
);
Gets the "ref2" point of dim
.
The returned point is internally owned and must not be freed
or modified. Anyway it is not const because a call to
adg_point_get_pair()
with the returned value must be able to
modify the internal cache.
|
an AdgDim |
Returns : |
the second reference point. [transfer none] |
Since 1.0
constgchar * adg_dim_get_value (AdgDim *dim
);
Gets the value text. The string is internally owned and must not be freed or modified.
|
an AdgDim |
Returns : |
the value text. [transfer none] |
Since 1.0
gdouble adg_dim_quote_angle (AdgDim *dim
,);
gdouble angle
This function is only useful in new dimension implementations.
Converts angle
accordling to the style of dim
. Any quote angle
should be validated by this method because every dimensioning
style has its own convention regardling the text rotation.
|
an AdgDim |
|
an angle (in radians) |
Returns : |
the angle to use (always in radians). |
Since 1.0
void adg_dim_set_detached (AdgDim *dim
,AdgThreeState detached
);
Sets a new state for the "detached" flag: check the property documentation for further details.
This is used only by dimensions where detaching has meaning. In some cases, such as with AdgRDim dimensions, this property is not used.
|
an AdgDim |
|
the new detached state |
Since 1.0
void adg_dim_set_dim_dress (AdgDim *dim
,AdgDress dress
);
Sets a new dimension dress to dim
. The new dress must be
related to the original dress for this property: you cannot
set a dress used for line styles to a dress managing fonts.
The check is done by calling adg_dress_are_related()
with
dress
and the previous dress as arguments. Check out its
documentation for details on what is a related dress.
Since 1.0
void adg_dim_set_level (AdgDim *dim
,);
gdouble level
Sets a new level for this dimension. The level is used to stack the quotes using a spacing value from dim_style (specified in global space).
|
an AdgDim |
|
the new level |
Since 1.0
void adg_dim_set_limits (AdgDim *dim
,const
,gchar *minconst
);gchar *max
Shortcut to set both the limits at once.
|
an AdgDim |
|
the new minumum value |
|
the new maximum value |
Since 1.0
void adg_dim_set_max (AdgDim *dim
,const
);gchar *max
Sets the maximum value. Use NULL
max
to disable it.
|
an AdgDim |
|
the new maximum value |
Since 1.0
void adg_dim_set_min (AdgDim *dim
,const
);gchar *min
Sets the minimum value. Use NULL
min
to disable it.
|
an AdgDim |
|
the new minimum limit |
Since 1.0
void adg_dim_set_outside (AdgDim *dim
,AdgThreeState outside
);
Sets a new state for the "outside" flag: check the property documentation for further details.
|
an AdgDim |
|
the new outside state |
Since 1.0
void adg_dim_set_pos (AdgDim *dim
,const AdgPoint *pos
);
Sets the "pos" property of dim
to pos
. The old point
is silently discarded, unreferencing its model if that
point was bound to a named pair (hence, possibly destroying
the model if it was the last reference).
pos
can be NULL
|
an AdgDim |
|
the new point to use as position |
Since 1.0
void adg_dim_set_pos_explicit (AdgDim *dim
,,
gdouble x);
gdouble y
Sets the "pos" 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 AdgDim |
|
x coordinate of the position |
|
y coordinate of the position |
Since 1.0
void adg_dim_set_pos_from_model (AdgDim *dim
,AdgModel *model
,const
);gchar *pos
Binds "pos" to the pos
named pair of model
. If model
is NULL
The assignment is lazy so pos
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_dim_set_pos_from_pair (AdgDim *dim
,const AdgPair *pos
);
Convenient function to set the "pos" property using a pair instead of explicit coordinates.
|
an AdgDim |
|
the coordinates pair of the position point |
Since 1.0
void adg_dim_set_ref1 (AdgDim *dim
,const AdgPoint *ref1
);
Sets the "ref1" property to ref1
. 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).
ref1
can be NULL
|
an AdgDim |
|
the new point to use as first reference |
Since 1.0
void adg_dim_set_ref1_explicit (AdgDim *dim
,,
gdouble x);
gdouble y
Sets the "ref1" 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 AdgDim |
|
x coordinate of the first reference point |
|
y coordinate of the first reference point |
Since 1.0
void adg_dim_set_ref1_from_model (AdgDim *dim
,AdgModel *model
,const
);gchar *ref1
Binds "ref1" to the ref1
named pair of model
. If model
is NULL
The assignment is lazy so ref1
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_dim_set_ref1_from_pair (AdgDim *dim
,const AdgPair *ref1
);
Convenient function to set the "ref1" property using a pair instead of explicit coordinates.
|
an AdgDim |
|
the coordinates pair of the first reference point |
Since 1.0
void adg_dim_set_ref2 (AdgDim *dim
,const AdgPoint *ref2
);
Sets the "ref2" property to ref2
. The old point
is silently discarded, unreferencing its model if that
point was bound to a named pair (hence, possibly destroying
the model if it was the last reference).
ref2
can be NULL
|
an AdgDim |
|
the new point to use as second reference |
Since 1.0
void adg_dim_set_ref2_explicit (AdgDim *dim
,,
gdouble x);
gdouble y
Sets the "ref2" 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 AdgDim |
|
x coordinate of the second reference point |
|
y coordinate of the second reference point |
Since 1.0
void adg_dim_set_ref2_from_model (AdgDim *dim
,AdgModel *model
,const
);gchar *ref2
Binds "ref2" to the ref2
named pair of model
. If model
is NULL
The assignment is lazy so ref2
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_dim_set_ref2_from_pair (AdgDim *dim
,const AdgPair *ref2
);
Convenient function to set the "ref2" property using a pair instead of explicit coordinates.
|
an AdgDim |
|
the coordinates pair of the second reference point |
Since 1.0
void adg_dim_set_value (AdgDim *dim
,const
);gchar *value
Explicitely sets the text to use as value. If value
is NULL
default_value()
Inside the template string, the "<>" tag (or whatever specified
by the "number-tag" property) is substituted with the
string returned by the default_value()
|
an AdgDim |
|
the value text |
Since 1.0
"detached"
property"detached" AdgThreeState : Read / Write
Where the quote must be positioned: in the middle of the base line (ADG_THREE_STATE_OFF), near the pos point (ADG_THREE_STATE_ON) or should be automatically deducted depending on the available space.
Default value: ADG_THREE_STATE_UNKNOWN
"dim-dress"
property"dim-dress" AdgDress : Read / Write
The dress to use for rendering this dimension.
Allowed values: [G_MAXINT,G_MININT]
Default value: 0
"level"
property"level"gdouble : Read / Write
The dimension level, that is the factor to multiply the baseline spacing (defined in the dimension style) to get the offset from pos where the quote should be rendered.
Default value: 1
"max"
property"max"gchar * : Read / Write
The maximum value allowed or the highest tolerance from value (depending of the dimension style): set to NULL to suppress.
Default value: NULL
"min"
property"min"gchar * : Read / Write
The minimum value allowed or the lowest tolerance from value (depending of the dimension style): set to NULL to suppress.
Default value: NULL
"outside"
property"outside" AdgThreeState : Read / Write
Whether the arrows must be inside the extension lines (ADG_THREE_STATE_OFF), must be extended outside the extension lines (ADG_THREE_STATE_ON) or should be automatically handled depending on the available space.
Default value: ADG_THREE_STATE_UNKNOWN
"pos"
property"pos" AdgPoint* : Read / Write
The reference position of the quote: it will be combined with "level" to get the real quote position.