AdgFillStyle

AdgFillStyle — Generic pattern fill

Synopsis

struct              AdgFillStyle;
struct              AdgFillStyleClass;
const CpmlExtents * adg_fill_style_get_extents          (AdgFillStyle *fill_style);
AdgPattern *        adg_fill_style_get_pattern          (AdgFillStyle *fill_style);
void                adg_fill_style_set_extents          (AdgFillStyle *fill_style,
                                                         const CpmlExtents *extents);
void                adg_fill_style_set_pattern          (AdgFillStyle *fill_style,
                                                         AdgPattern *pattern);

Object Hierarchy

  GObject
   +----AdgStyle
         +----AdgFillStyle
               +----AdgRuledFill

Properties

  "pattern"                  AdgPattern*           : Read / Write

Description

A style defining a generic fill based on cairo_pattern_t.

Details

struct AdgFillStyle

struct AdgFillStyle;

All fields are private and should not be used directly. Use its public methods instead.

Since 1.0


struct AdgFillStyleClass

struct AdgFillStyleClass {
    void                (*set_extents)          (AdgFillStyle   *fill_style,
                                                 const CpmlExtents *extents);
};

adg_fill_style_get_extents ()

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.

fill_style :

an AdgFillStyle

Returns :

the extents of fill_style or NULL on errors. [transfer none]

Since 1.0


adg_fill_style_get_pattern ()

AdgPattern *        adg_fill_style_get_pattern          (AdgFillStyle *fill_style);

Gets the current pattern binded to fill_style.

fill_style :

an AdgFillStyle

Returns :

the current pattern

Since 1.0


adg_fill_style_set_extents ()

void                adg_fill_style_set_extents          (AdgFillStyle *fill_style,
                                                         const CpmlExtents *extents);

Note

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. The default implementation simply sets the extents, so the last one has precedence. Any fill style implementation can override the set_extents() implementation to customize this behavior, for example to keep the greatest boundary box instead of the last one.

fill_style :

an AdgFillStyle

extents :

the new extents

Since 1.0


adg_fill_style_set_pattern ()

void                adg_fill_style_set_pattern          (AdgFillStyle *fill_style,
                                                         AdgPattern *pattern);

Note

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().

fill_style :

an AdgFillStyle

pattern :

the new pattern

Since 1.0

Property Details

The "pattern" property

  "pattern"                  AdgPattern*           : Read / Write

The cairo pattern set for this entity.