| GOffice Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
GOPattern; enum GOPatternType; char const * go_pattern_as_str (GOPatternType pattern); cairo_pattern_t * go_pattern_create_cairo_pattern (GOPattern const *pattern,cairo_t *cr); GOPatternType go_pattern_from_str (char const *name); guint8 const * go_pattern_get_pattern (GOPattern const *pat); xmlChar * go_pattern_get_svg_path (GOPattern const *pattern,double *width,double *height); gboolean go_pattern_is_solid (GOPattern const *pat,GOColor *color); void go_pattern_set_solid (GOPattern *pat,GOColor fore);
typedef struct {
GOColor fore, back;
unsigned pattern;
} GOPattern;
GOPattern::pattern is the used GOPatternType.
typedef enum {
GO_PATTERN_SOLID,
GO_PATTERN_GREY75,
GO_PATTERN_GREY50,
GO_PATTERN_GREY25,
GO_PATTERN_GREY125,
GO_PATTERN_GREY625,
GO_PATTERN_HORIZ,
GO_PATTERN_VERT,
GO_PATTERN_REV_DIAG,
GO_PATTERN_DIAG,
GO_PATTERN_DIAG_CROSS,
GO_PATTERN_THICK_DIAG_CROSS,
GO_PATTERN_THIN_HORIZ,
GO_PATTERN_THIN_VERT,
GO_PATTERN_THIN_REV_DIAG,
GO_PATTERN_THIN_DIAG,
GO_PATTERN_THIN_HORIZ_CROSS,
GO_PATTERN_THIN_DIAG_CROSS,
GO_PATTERN_FOREGROUND_SOLID,
GO_PATTERN_SMALL_CIRCLES,
GO_PATTERN_SEMI_CIRCLES,
GO_PATTERN_THATCH,
GO_PATTERN_LARGE_CIRCLES,
GO_PATTERN_BRICKS,
GO_PATTERN_MAX
} GOPatternType;
| solid using background color. | |
| 75% background color. | |
| 50% background color. | |
| 25% background color. | |
| 12.5% background color. | |
| 6.25% background color. | |
| horizontal stripe. | |
| vertical stripe. | |
| reverse diagonal stripe. | |
| diagonal stripe. | |
| diagonal crosshatch. | |
| thick diagonal crosshatch. | |
| thin horizontal stripe. | |
| thin vertical stripe. | |
| thin reverse diagonal stripe. | |
| thin diagonal stripe. | |
| thin horizontal crosshatch. | |
| thin diagonal crosshatch. | |
| solid using foreground color. | |
| small circles. | |
| semi circles. | |
| thatch. | |
| large circles. | |
| bricks. | |
| maximum value, should not occur. |
cairo_pattern_t * go_pattern_create_cairo_pattern (GOPattern const *pattern,cairo_t *cr);
|
a GOPattern |
|
a cairo context |
Returns : |
a cairo pattern object corresponding to pattern parameters. The returned
surface must be freed after use, using cairo_pattern_destroy.
|
guint8 const * go_pattern_get_pattern (GOPattern const *pat);
|
|
Returns : |
xmlChar * go_pattern_get_svg_path (GOPattern const *pattern,double *width,double *height);
Retrieves an SVG path as string, which represents pattern shape. Caller is responsible for freeing the resulting string.
If width != NULL, returns pattern width. If height != NULL, returns pattern height.
|
a GOPattern |
|
pattern width |
|
pattern height |
Returns : |
a xmlChar buffer (free using xmlFree). |