![]() |
![]() |
![]() |
Goffice Reference Manual | ![]() |
---|---|---|---|---|
enum GOStyleFlag; enum GOStyleFill; enum GOImageType; GOStyleLine; GOStyleMark; GOStyle; GOStyle* go_style_new (void); GOStyle* go_style_dup (GOStyle const *style); void go_style_assign (GOStyle *dst, GOStyle const *src); void go_style_apply_theme (GOStyle *dst, GOStyle const *src); GOMarkerconst * go_style_get_marker (GOStyle *style); void go_style_set_marker (GOStyle *style, GOMarker *marker); void go_style_set_font_desc (GOStyle *style, PangoFontDescription *desc); void go_style_set_font (GOStyle *style, GOFont const *font); void go_style_set_fill_brightness (GOStyle *style, float brightness); void go_style_set_text_angle (GOStyle *style, double angle); gboolean go_style_is_different_size (GOStyle const *a, GOStyle const *b); gboolean go_style_is_marker_visible (GOStyle const *style); gboolean go_style_is_line_visible (GOStyle const *style); gboolean go_style_is_outline_visible (GOStyle const *style); gboolean go_style_is_fill_visible (GOStyle const *style); void go_style_force_auto (GOStyle *style); void go_style_populate_editor (GOStyle *style, GOEditor *editor, GOStyle *default_style, GOCmdContext *cc, GObject *object_with_style, gboolean watch_for_external_change); gpointer go_style_get_editor (GOStyle *style, GOStyle *default_style, GOCmdContext *cc, GObject *object_with_style); cairo_pattern_t* go_style_create_cairo_pattern (GOStyle const *style, cairo_t *cr);
typedef enum { GO_STYLE_OUTLINE = 1 << 0, GO_STYLE_FILL = 1 << 1, GO_STYLE_LINE = 1 << 2, GO_STYLE_MARKER = 1 << 3, GO_STYLE_FONT = 1 << 4, GO_STYLE_TEXT_LAYOUT = 1 << 5, GO_STYLE_INTERPOLATION = 1 << 6, GO_STYLE_MARKER_NO_COLOR = 1 << 7, GO_STYLE_ALL = 0x1F } GOStyleFlag;
typedef enum { GO_STYLE_FILL_NONE = 0, GO_STYLE_FILL_PATTERN = 1, GO_STYLE_FILL_GRADIENT = 2, GO_STYLE_FILL_IMAGE = 3 } GOStyleFill;
typedef enum { GO_IMAGE_STRETCHED, GO_IMAGE_WALLPAPER, GO_IMAGE_CENTERED } GOImageType;
typedef struct { /* <0 == no outline, * =0 == hairline : unscaled, minimum useful (can be bigger than visible) size. * >0 in pts */ float width; GOLineDashType dash_type; gboolean auto_dash; GOColor color; gboolean auto_color; unsigned pattern_unimplemented_yet; /* TODO: implement. Not used and must not be used before implementation */ } GOStyleLine;
typedef struct { GOMarker *mark; gboolean auto_shape; gboolean auto_outline_color; gboolean auto_fill_color; } GOStyleMark;
void go_style_apply_theme (GOStyle *dst, GOStyle const *src);
Merge the attributes from src
onto the elements of dst
that were not user
assigned (is_auto)
GOMarkerconst * go_style_get_marker (GOStyle *style);
Accessor for style
::marker, without referencing it.
|
GOStyle |
Returns : |
the style GOMarker. |
void go_style_set_marker (GOStyle *style, GOMarker *marker);
Absorb a reference to marker
and assign it to style
.
|
GOStyle |
|
GOMarker |
void go_style_set_font_desc (GOStyle *style, PangoFontDescription *desc);
|
|
|
void go_style_set_fill_brightness (GOStyle *style, float brightness);
|
|
|
void go_style_set_text_angle (GOStyle *style, double angle);
Set text rotation angle in degrees. Valid values are in the range [-180.0° , 180.0°].
|
GOStyle |
|
text rotation in degrees |
gboolean go_style_is_different_size (GOStyle const *a, GOStyle const *b);
|
|
|
|
Returns : |
gboolean go_style_is_marker_visible (GOStyle const *style);
|
|
Returns : |
gboolean go_style_is_line_visible (GOStyle const *style);
|
|
Returns : |
gboolean go_style_is_outline_visible (GOStyle const *style);
|
|
Returns : |
gboolean go_style_is_fill_visible (GOStyle const *style);
|
|
Returns : |
void go_style_populate_editor (GOStyle *style, GOEditor *editor, GOStyle *default_style, GOCmdContext *cc, GObject *object_with_style, gboolean watch_for_external_change);
|
|
|
|
|
|
|
|
|
|
|
gpointer go_style_get_editor (GOStyle *style, GOStyle *default_style, GOCmdContext *cc, GObject *object_with_style);
|
|
|
|
|
|
|
|
Returns : |
cairo_pattern_t* go_style_create_cairo_pattern (GOStyle const *style, cairo_t *cr);
Create a cairo_patern_t using the current style settings for filling. A pattern will be created only if the style has the corresponding field and if it is not set to a none constant.
|
GOStyle |
|
a cairo context |
Returns : |
the pattern or NULL if it could not be created. |