| Goffice Reference Manual | ||||
|---|---|---|---|---|
#define GOG_STYLE_TYPE #define GOG_STYLE (o) #define IS_GOG_STYLE (o) GType gog_style_get_type (void); enum GogStyleFlag; enum GogFillStyle; enum GogImageType; GogStyleLine; GogStyleMark; GogStyle; GogStyle* gog_style_new (void); GogStyle* gog_style_dup (GogStyle const *style); void gog_style_assign (GogStyle *dst, GogStyle const *src); void gog_style_apply_theme (GogStyle *dst, GogStyle const *src); GOMarkerconst * gog_style_get_marker (GogStyle *style); void gog_style_set_marker (GogStyle *style, GOMarker *marker); void gog_style_set_font_desc (GogStyle *style, PangoFontDescription *desc); void gog_style_set_font (GogStyle *style, GOFont const *font); void gog_style_set_fill_brightness (GogStyle *style, float brightness); void gog_style_set_text_angle (GogStyle *style, double angle); gboolean gog_style_is_different_size (GogStyle const *a, GogStyle const *b); gboolean gog_style_is_marker_visible (GogStyle const *style); gboolean gog_style_is_line_visible (GogStyle const *style); gboolean gog_style_is_outline_visible (GogStyle const *style); gboolean gog_style_is_fill_visible (GogStyle const *style); void gog_style_force_auto (GogStyle *style); void gog_style_populate_editor (GogStyle *style, GogEditor *editor, GogStyle *default_style, GOCmdContext *cc, GObject *object_with_style, gboolean watch_for_external_change); gpointer gog_style_get_editor (GogStyle *style, GogStyle *default_style, GOCmdContext *cc, GObject *object_with_style); cairo_pattern_t* gog_style_create_cairo_pattern (GogStyle const *style, cairo_t *cr);
typedef enum {
GOG_STYLE_OUTLINE = 1 << 0,
GOG_STYLE_FILL = 1 << 1,
GOG_STYLE_LINE = 1 << 2,
GOG_STYLE_MARKER = 1 << 3,
GOG_STYLE_FONT = 1 << 4,
GOG_STYLE_TEXT_LAYOUT = 1 << 5,
GOG_STYLE_INTERPOLATION = 1 << 6,
GOG_STYLE_MARKER_NO_COLOR = 1 << 7,
GOG_STYLE_ALL = 0x1F
} GogStyleFlag;
typedef enum {
GOG_FILL_STYLE_NONE = 0,
GOG_FILL_STYLE_PATTERN = 1,
GOG_FILL_STYLE_GRADIENT = 2,
GOG_FILL_STYLE_IMAGE = 3
} GogFillStyle;
typedef enum {
GOG_IMAGE_STRETCHED,
GOG_IMAGE_WALLPAPER,
GOG_IMAGE_CENTERED
} GogImageType;
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 */
} GogStyleLine;
typedef struct {
GOMarker *mark;
gboolean auto_shape;
gboolean auto_outline_color;
gboolean auto_fill_color;
} GogStyleMark;
void gog_style_apply_theme (GogStyle *dst, GogStyle const *src);
Merge the attributes from src onto the elements of dst that were not user
assigned (is_auto)
GOMarkerconst * gog_style_get_marker (GogStyle *style);
Accessor for style::marker, without referencing it.
|
GogStyle |
Returns : |
the style GOMarker. |
void gog_style_set_marker (GogStyle *style, GOMarker *marker);
Absorb a reference to marker and assign it to style.
|
GogStyle |
|
GOMarker |
void gog_style_set_font_desc (GogStyle *style, PangoFontDescription *desc);
|
|
|
void gog_style_set_fill_brightness (GogStyle *style, float brightness);
|
|
|
void gog_style_set_text_angle (GogStyle *style, double angle);
Set text rotation angle in degrees. Valid values are in the range [-180.0° , 180.0°].
|
GogStyle |
|
text rotation in degrees |
gboolean gog_style_is_different_size (GogStyle const *a, GogStyle const *b);
|
|
|
|
Returns : |
gboolean gog_style_is_marker_visible (GogStyle const *style);
|
|
Returns : |
gboolean gog_style_is_line_visible (GogStyle const *style);
|
|
Returns : |
gboolean gog_style_is_outline_visible (GogStyle const *style);
|
|
Returns : |
gboolean gog_style_is_fill_visible (GogStyle const *style);
|
|
Returns : |
void gog_style_populate_editor (GogStyle *style, GogEditor *editor, GogStyle *default_style, GOCmdContext *cc, GObject *object_with_style, gboolean watch_for_external_change);
|
|
|
|
|
|
|
|
|
|
|
gpointer gog_style_get_editor (GogStyle *style, GogStyle *default_style, GOCmdContext *cc, GObject *object_with_style);
|
|
|
|
|
|
|
|
Returns : |
cairo_pattern_t* gog_style_create_cairo_pattern (GogStyle 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.
|
GogStyle |
|
a cairo context |
Returns : |
the pattern or NULL if it could not be created. |