Goffice Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Synopsis
GOPattern; enum GOPatternType; GOPatternType go_pattern_from_str (char const *name
); char const * go_pattern_as_str (GOPatternType pattern
); gboolean go_pattern_is_solid (GOPattern const *pat
,GOColor *color
); void go_pattern_set_solid (GOPattern *pat
,GOColor fore
); guint8 const * go_pattern_get_pattern (GOPattern const *pat
); xmlChar * go_pattern_get_svg_path (GOPattern const *pattern
,double *width
,double *height
); cairo_pattern_t * go_pattern_create_cairo_pattern (GOPattern const *pattern
,cairo_t *cr
); GtkWidget * go_pattern_selector_new (GOPatternType initial_type
,GOPatternType default_type
); void go_pattern_selector_set_colors (GOSelector *selector
,GOColor foreground
,GOColor background
);
Details
enum 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;
go_pattern_set_solid ()
void go_pattern_set_solid (GOPattern *pat
,GOColor fore
);
Makes pat
a solid pattern with colour fore
.
go_pattern_get_pattern ()
guint8 const * go_pattern_get_pattern (GOPattern const *pat
);
|
|
Returns : |
go_pattern_get_svg_path ()
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). |
go_pattern_create_cairo_pattern ()
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.
|
go_pattern_selector_new ()
GtkWidget * go_pattern_selector_new (GOPatternType initial_type
,GOPatternType default_type
);
Creates a new pattern selector.
|
pattern type initially selected |
|
automatic pattern type |
Returns : |
a new GtkWidget. |
go_pattern_selector_set_colors ()
void go_pattern_selector_set_colors (GOSelector *selector
,GOColor foreground
,GOColor background
);
Updates swatch colors of selector
.
|
a pattern GOSelector |
|
foreground color |
|
background color |