![]() |
![]() |
![]() |
adg-1 reference manual |
![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct AdgDimStyle; struct AdgDimStyleClass;gdouble adg_dim_style_get_baseline_spacing (AdgDimStyle *dim_style
);gdouble adg_dim_style_get_beyond (AdgDimStyle *dim_style
); AdgDress adg_dim_style_get_color_dress (AdgDimStyle *dim_style
);gdouble adg_dim_style_get_from_offset (AdgDimStyle *dim_style
); const AdgPair * adg_dim_style_get_limits_shift (AdgDimStyle *dim_style
);gdouble adg_dim_style_get_limits_spacing (AdgDimStyle *dim_style
); AdgDress adg_dim_style_get_line_dress (AdgDimStyle *dim_style
); AdgDress adg_dim_style_get_max_dress (AdgDimStyle *dim_style
); AdgDress adg_dim_style_get_min_dress (AdgDimStyle *dim_style
); constgchar * adg_dim_style_get_number_format (AdgDimStyle *dim_style
); constgchar * adg_dim_style_get_number_tag (AdgDimStyle *dim_style
); const AdgPair * adg_dim_style_get_quote_shift (AdgDimStyle *dim_style
);gdouble adg_dim_style_get_to_offset (AdgDimStyle *dim_style
); AdgDress adg_dim_style_get_value_dress (AdgDimStyle *dim_style
); AdgMarker * adg_dim_style_marker1_new (AdgDimStyle *dim_style
); AdgMarker * adg_dim_style_marker2_new (AdgDimStyle *dim_style
); AdgDimStyle * adg_dim_style_new (void
);void adg_dim_style_set_baseline_spacing (AdgDimStyle *dim_style
,);
gdouble spacingvoid adg_dim_style_set_beyond (AdgDimStyle *dim_style
,);
gdouble beyondvoid adg_dim_style_set_color_dress (AdgDimStyle *dim_style
,AdgDress dress
);void adg_dim_style_set_from_offset (AdgDimStyle *dim_style
,);
gdouble offsetvoid adg_dim_style_set_limits_shift (AdgDimStyle *dim_style
,const AdgPair *shift
);void adg_dim_style_set_limits_spacing (AdgDimStyle *dim_style
,);
gdouble spacingvoid adg_dim_style_set_line_dress (AdgDimStyle *dim_style
,AdgDress dress
);void adg_dim_style_set_marker1 (AdgDimStyle *dim_style
,AdgMarker *marker
);void adg_dim_style_set_marker2 (AdgDimStyle *dim_style
,AdgMarker *marker
);void adg_dim_style_set_max_dress (AdgDimStyle *dim_style
,AdgDress dress
);void adg_dim_style_set_min_dress (AdgDimStyle *dim_style
,AdgDress dress
);void adg_dim_style_set_number_format (AdgDimStyle *dim_style
,const
);gchar *formatvoid adg_dim_style_set_number_tag (AdgDimStyle *dim_style
,const
);gchar *tagvoid adg_dim_style_set_quote_shift (AdgDimStyle *dim_style
,const AdgPair *shift
);void adg_dim_style_set_to_offset (AdgDimStyle *dim_style
,);
gdouble offsetvoid adg_dim_style_set_value_dress (AdgDimStyle *dim_style
,AdgDress dress
);
"baseline-spacing"gdouble : Read / Write "beyond"gdouble : Read / Write "color-dress" AdgDress : Read / Write "from-offset"gdouble : Read / Write "limits-shift" AdgPair* : Read / Write "limits-spacing"gdouble : Read / Write "line-dress" AdgDress : Read / Write "marker1" AdgMarker* : Write "marker2" AdgMarker* : Write "max-dress" AdgDress : Read / Write "min-dress" AdgDress : Read / Write "number-format"gchar * : Read / Write "number-tag"gchar * : Read / Write "quote-shift" AdgPair* : Read / Write "to-offset"gdouble : Read / Write "value-dress" AdgDress : Read / Write
Contains parameters on how to build dimensions such as the different font styles (for value and limits), line style, offsets of the various dimension components etc...
struct AdgDimStyle;
All fields are private and should not be used directly. Use its public methods instead.
Since 1.0
gdouble adg_dim_style_get_baseline_spacing (AdgDimStyle *dim_style
);
Gets the distance between two consecutive baselines while stacking dimensions.
|
an AdgDimStyle object |
Returns : |
the requested spacing. |
Since 1.0
gdouble adg_dim_style_get_beyond (AdgDimStyle *dim_style
);
Gets how much (in global space) the baseline should extend beyond the extension lines on dimension with outside markers.
|
an AdgDimStyle object |
Returns : |
the requested beyond length. |
Since 1.0
AdgDress adg_dim_style_get_color_dress (AdgDimStyle *dim_style
);
Gets the dim_style
color dress to be used. This dress should be
intended as a fallback color as it could be overriden by more
specific dresses, such as a color explicitely specified on the
"value-dress".
|
an AdgDimStyle object |
Returns : |
the color dress. [transfer none] |
Since 1.0
gdouble adg_dim_style_get_from_offset (AdgDimStyle *dim_style
);
Gets the distance (in global space) the extension lines must keep from the sensed points.
|
an AdgDimStyle object |
Returns : |
the requested distance. |
Since 1.0
const AdgPair * adg_dim_style_get_limits_shift (AdgDimStyle *dim_style
);
Gets the smooth displacement for the limits. The returned pointer refers to an internal allocated struct and must not be modified or freed.
|
an AdgDimStyle object |
Returns : |
the requested shift. [transfer none] |
Since 1.0
gdouble adg_dim_style_get_limits_spacing (AdgDimStyle *dim_style
);
Gets the distance (in global space) between the limits/tolerances.
|
an AdgDimStyle object |
Returns : |
the requested spacing. |
Since 1.0
AdgDress adg_dim_style_get_line_dress (AdgDimStyle *dim_style
);
Gets the line dress to be used for rendering the base and
the extension lines with dim_style
.
|
an AdgDimStyle object |
Returns : |
the line dress. [transfer none] |
Since 1.0
AdgDress adg_dim_style_get_max_dress (AdgDimStyle *dim_style
);
Gets the dim_style
dress to be used for the upper limit.
|
an AdgDimStyle object |
Returns : |
the upper limit dress. [transfer none] |
Since 1.0
AdgDress adg_dim_style_get_min_dress (AdgDimStyle *dim_style
);
Gets the dim_style
dress to be used for the lower limit.
|
an AdgDimStyle object |
Returns : |
the lower limit dress. [transfer none] |
Since 1.0
constgchar * adg_dim_style_get_number_format (AdgDimStyle *dim_style
);
Gets the number format (in printf style) of this quoting style. The returned pointer refers to internally managed text that must not be modified or freed.
|
an AdgDimStyle object |
Returns : |
the requested format. [transfer none] |
Since 1.0
constgchar * adg_dim_style_get_number_tag (AdgDimStyle *dim_style
);
Gets the number tag of dim_style
. This tag will be used while
generating the set values of the dimensions bound to this style:
check the "value" documentation for further details.
The returned pointer refers to internally managed text that must not be modified or freed.
|
an AdgDimStyle object |
Returns : |
the requested tag. [transfer none] |
Since 1.0
const AdgPair * adg_dim_style_get_quote_shift (AdgDimStyle *dim_style
);
Gets the smooth displacement of the quote. The returned pointer refers to an internal allocated struct and must not be modified or freed.
|
an AdgDimStyle object |
Returns : |
the requested shift. [transfer none] |
Since 1.0
gdouble adg_dim_style_get_to_offset (AdgDimStyle *dim_style
);
Gets how much (in global space) the extension lines must extend after crossing the baseline.
|
an AdgDimStyle object |
Returns : |
the requested distance. |
Since 1.0
AdgDress adg_dim_style_get_value_dress (AdgDimStyle *dim_style
);
Gets the font dress to be used for the basic value of dimensions
with dim_style
.
|
an AdgDimStyle object |
Returns : |
the font dress. [transfer none] |
Since 1.0
AdgMarker * adg_dim_style_marker1_new (AdgDimStyle *dim_style
);
Creates a new marker entity by cloning the g_object_unref()
|
an AdgDimStyle |
Returns : |
a newly created marker or NULL |
Since 1.0
AdgMarker * adg_dim_style_marker2_new (AdgDimStyle *dim_style
);
Creates a new marker entity by cloning the g_object_unref()
|
an AdgDimStyle |
Returns : |
a newly created marker or NULL |
Since 1.0
AdgDimStyle * adg_dim_style_new (void
);
Constructs a new empty dimension style initialized with default params.
Returns : |
a newly created dimension style. [transfer full] |
Since 1.0
void adg_dim_style_set_baseline_spacing (AdgDimStyle *dim_style
,);
gdouble spacing
Sets a new value in the "baseline-spacing" value.
|
an AdgDimStyle object |
|
the new spacing |
Since 1.0
void adg_dim_style_set_beyond (AdgDimStyle *dim_style
,);
gdouble beyond
Sets a new value in the "beyond" property.
|
an AdgDimStyle object |
|
the new length |
Since 1.0
void adg_dim_style_set_color_dress (AdgDimStyle *dim_style
,AdgDress dress
);
Sets a new color dress on dim_style
.
|
an AdgDimStyle object |
|
the new color dress |
Since 1.0
void adg_dim_style_set_from_offset (AdgDimStyle *dim_style
,);
gdouble offset
Sets a new value in the "from-offset" property.
|
an AdgDimStyle object |
|
the new offset |
Since 1.0
void adg_dim_style_set_limits_shift (AdgDimStyle *dim_style
,const AdgPair *shift
);
Sets a new "limits-shift" value.
|
an AdgDimStyle object |
|
the new displacement |
Since 1.0
void adg_dim_style_set_limits_spacing (AdgDimStyle *dim_style
,);
gdouble spacing
Sets a new "limits-spacing" value.
|
an AdgDimStyle object |
|
the new spacing |
Since 1.0
void adg_dim_style_set_line_dress (AdgDimStyle *dim_style
,AdgDress dress
);
Sets a new line dress on dim_style
.
|
an AdgDimStyle object |
|
the new line dress |
Since 1.0
void adg_dim_style_set_marker1 (AdgDimStyle *dim_style
,AdgMarker *marker
);
Uses marker
as entity template to generate a new marker entity
when a call to adg_dim_style_marker1_new()
is made. It is allowed
to pass NULL
marker
, in which case the template data of the
first marker are unset.
This method duplicates internally the property values of marker
,
so any further change to marker
does not affect dim_style
anymore.
This also means marker
could be destroyed without problems after
this call because dim_style
uses only its property values and does
not add any references to marker
.
Since 1.0
void adg_dim_style_set_marker2 (AdgDimStyle *dim_style
,AdgMarker *marker
);
Uses marker
as entity template to generate a new marker entity
when a call to adg_dim_style_marker2_new()
is made. It is allowed
to pass NULL
marker
, in which case the template data of the
second marker are unset.
This method duplicates internally the property values of marker
,
so any further change to marker
does not affect dim_style
anymore.
This also means marker
could be destroyed without problems after
this call because dim_style
uses only its property values and does
not add any references to marker
.
Since 1.0
void adg_dim_style_set_max_dress (AdgDimStyle *dim_style
,AdgDress dress
);
Sets a new dress on dim_style
for the upper limit value.
|
an AdgDimStyle object |
|
the new upper limit dress |
Since 1.0
void adg_dim_style_set_min_dress (AdgDimStyle *dim_style
,AdgDress dress
);
Sets a new dress on dim_style
for the lower limit value.
|
an AdgDimStyle object |
|
the new lower limit dress |
Since 1.0
void adg_dim_style_set_number_format (AdgDimStyle *dim_style
,const
);gchar *format
Sets a new value in the "number-format" property.
|
an AdgDimStyle object |
|
the new format to adopt |
Since 1.0
void adg_dim_style_set_number_tag (AdgDimStyle *dim_style
,const
);gchar *tag
Sets a new tag in the "number-tag" property.
|
an AdgDimStyle object |
|
the new tag |
Since 1.0
void adg_dim_style_set_quote_shift (AdgDimStyle *dim_style
,const AdgPair *shift
);
Sets a new "quote-shift" value.
|
an AdgDimStyle object |
|
the new displacement |
Since 1.0
void adg_dim_style_set_to_offset (AdgDimStyle *dim_style
,);
gdouble offset
Sets a new value in the "to-offset" property.
|
an AdgDimStyle object |
|
the new offset |
Since 1.0
void adg_dim_style_set_value_dress (AdgDimStyle *dim_style
,AdgDress dress
);
Sets a new dress on dim_style
for the basic value.
|
an AdgDimStyle object |
|
the new basic value font style |
Since 1.0
"baseline-spacing"
property"baseline-spacing"gdouble : Read / Write
Distance between two consecutive baselines while stacking dimensions.
Allowed values: >= 0
Default value: 32
"beyond"
property"beyond"gdouble : Read / Write
How much the baseline should be extended (in global space) beyond the extension lines on dimensions with outside markers.
Allowed values: >= 0
Default value: 20
"color-dress"
property"color-dress" AdgDress : Read / Write
Color dress for the whole dimension.
Allowed values: [G_MAXINT,G_MININT]
Default value: 0
"from-offset"
property"from-offset"gdouble : Read / Write
Offset (in global space) of the extension lines from the path to the quote.
Allowed values: >= 0
Default value: 5
"limits-shift"
property"limits-shift" AdgPair* : Read / Write
Used to specify a smooth displacement (in global space) for the limits/tolerances by taking as reference the perfect compact position.
"limits-spacing"
property"limits-spacing"gdouble : Read / Write
Distance between limits/tolerances.
Allowed values: >= 0
Default value: 2
"line-dress"
property"line-dress" AdgDress : Read / Write
Line dress for the baseline and the extension lines.
Allowed values: [G_MAXINT,G_MININT]
Default value: 0
"max-dress"
property"max-dress" AdgDress : Read / Write
Font dress for the upper limit value.
Allowed values: [G_MAXINT,G_MININT]
Default value: 0
"min-dress"
property"min-dress" AdgDress : Read / Write
Font dress for the lower limit value.
Allowed values: [G_MAXINT,G_MININT]
Default value: 0
"number-format"
property"number-format"gchar * : Read / Write
The format (in printf style) of the numeric component of the basic value.
Default value: "%-.7g"
"number-tag"
property"number-tag"gchar * : Read / Write
The tag to substitute inside the value template string.
Default value: "<>"
"quote-shift"
property"quote-shift" AdgPair* : Read / Write
Used to specify a smooth displacement (in global space) of the quote by taking as reference the perfect compact position (the middle of the baseline on common linear dimension, for instance).
"to-offset"
property"to-offset"gdouble : Read / Write
How many extend (in global space) the extension lines after hitting the baseline.
Allowed values: >= 0
Default value: 5
"value-dress"
property"value-dress" AdgDress : Read / Write
Font dress for the nominal value of the dimension.
Allowed values: [G_MAXINT,G_MININT]
Default value: 0