![]() |
![]() |
![]() |
adg-1 reference manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <adg-1/adg.h> struct AdgFillStyle; struct AdgFillStyleClass; void adg_fill_style_set_pattern (AdgFillStyle *fill_style
,cairo_pattern_t *pattern
); cairo_pattern_t * adg_fill_style_get_pattern (AdgFillStyle *fill_style
); void adg_fill_style_set_extents (AdgFillStyle *fill_style
,const CpmlExtents *extents
); const CpmlExtents * adg_fill_style_get_extents (AdgFillStyle *fill_style
);
struct AdgFillStyle;
All fields are private and should not be used directly. Use its public methods instead.
Since 1.0
struct AdgFillStyleClass { /* Virtual table */ void (*set_extents) (AdgFillStyle *fill_style, const CpmlExtents *extents); };
The default set_extents
@ implementation simply sets the extents owned by
the fill style instance to the one provided, so the last call has
precedence. Any derived class can override it to customize this behavior,
for example to keep the greatest boundary box instead of the last one.
virtual method that specifies where a specific fill style must be applied. It is called by AdgHatch in the rendering phase passing with its boundary box as argument. |
Since 1.0
void adg_fill_style_set_pattern (AdgFillStyle *fill_style
,cairo_pattern_t *pattern
);
This function is only useful in new fill implementations.
Sets a new pattern on fill_style
. A new reference is added to
pattern
with cairo_pattern_reference()
and the old pattern
(if any) is unreferenced with cairo_pattern_destroy()
.
|
an AdgFillStyle |
|
the new pattern |
Since 1.0
cairo_pattern_t * adg_fill_style_get_pattern (AdgFillStyle *fill_style
);
Gets the current pattern binded to fill_style
.
|
an AdgFillStyle |
Returns : |
the current pattern. [transfer none] |
Since 1.0
void adg_fill_style_set_extents (AdgFillStyle *fill_style
,const CpmlExtents *extents
);
This function is only useful in new fill style implementations.
Forcibly sets new extents on fill_style
. Any fill style class
that want to make some kind of customization can override the
set_extents()
virtual method to intercept any extents change.
Sets new extents on fill_style
. These extents are usually set
by the arrange()
method of the entity using this filling style.
|
an AdgFillStyle |
|
the new extents |
Since 1.0
const CpmlExtents * adg_fill_style_get_extents (AdgFillStyle *fill_style
);
Stores a copy of the extents of fill_style
in extents
.
This struct specifies the maximum portion (in global space)
this fill style should be applied: it will clamped by the
entities as needed.
|
an AdgFillStyle |
Returns : |
the extents of fill_style or NULL on errors. [transfer none]
|
Since 1.0