## GOStyle GOStyle |

## Synopsis

    enum                GOImageType;
                        GOStyle;
    enum                GOStyleFill;
    enum                GOStyleFlag;
                        GOStyleLine;
                        GOStyleMark;
    void                go_style_apply_theme                (GOStyle *dst,
                                                             GOStyle const *src,
                                                             GOStyleFlag fields);
    void                go_style_assign                     (GOStyle *dst,
                                                             GOStyle const *src);
    GOStyle *           go_style_dup                        (GOStyle const *style);
    void                go_style_fill                       (GOStyle const *style,
                                                             cairo_t *cr,
                                                             gboolean preserve);
    void                go_style_force_auto                 (GOStyle *style);
    void                go_style_clear_auto                 (GOStyle *style);
    gpointer            go_style_get_editor                 (GOStyle *style,
                                                             GOStyle *default_style,
                                                             GOCmdContext *cc,
                                                             GObject *object_with_style);
    GOMarker const *    go_style_get_marker                 (GOStyle *style);
    gboolean            go_style_is_auto                    (GOStyle *style);
    gboolean            go_style_is_different_size          (GOStyle const *a,
                                                             GOStyle const *b);
    gboolean            go_style_is_fill_visible            (GOStyle const *style);
    gboolean            go_style_is_line_visible            (GOStyle const *style);
    gboolean            go_style_is_marker_visible          (GOStyle const *style);
    gboolean            go_style_is_outline_visible         (GOStyle const *style);
    GOStyle *           go_style_new                        (void);
    void                go_style_populate_editor            (GOStyle *style,
                                                             GOEditor *editor,
                                                             GOStyle *default_style,
                                                             GOCmdContext *cc,
                                                             GObject *object_with_style,
                                                             gboolean watch_for_external_change);
    gboolean            go_style_set_cairo_line             (GOStyle const *style,
                                                             cairo_t *cr);
    void                go_style_set_fill_brightness        (GOStyle *style,
                                                             double brightness);
    void                go_style_set_font                   (GOStyle *style,
                                                             GOFont const *font);
    void                go_style_set_font_desc              (GOStyle *style,
                                                             PangoFontDescription *desc);
    void                go_style_set_marker                 (GOStyle *style,
                                                             GOMarker *marker);
    void                go_style_set_text_angle             (GOStyle *style,
                                                             double angle);

## Object Hierarchy

      GObject
       +----GOStyle
             +----GogStyle

## Implemented Interfaces

GOStyle implements GOPersist.

## Description

## Details

### enum GOImageType

    typedef enum {
    	GO_IMAGE_STRETCHED,
    	GO_IMAGE_WALLPAPER,
    	GO_IMAGE_CENTERED,
    	GO_IMAGE_CENTERED_WALLPAPER
    } GOImageType;

`GO_IMAGE_STRETCHED` | stretch the image so that it fills the whole area.
`GO_IMAGE_WALLPAPER` | repeat the image starting from top left.
`GO_IMAGE_CENTERED` | use only one image at its natural size, centered in the area.
`GO_IMAGE_CENTERED_WALLPAPER` | repeat the image starting from one at center.

### GOStyle

    typedef struct _GOStyle GOStyle;

### enum GOStyleFill

    typedef enum {
    	GO_STYLE_FILL_NONE = 0,
    	GO_STYLE_FILL_PATTERN = 1,
    	GO_STYLE_FILL_GRADIENT = 2,
    	GO_STYLE_FILL_IMAGE = 3
    } GOStyleFill;

`GO_STYLE_FILL_NONE` | no filling.
`GO_STYLE_FILL_PATTERN` | fill with pattern.
`GO_STYLE_FILL_GRADIENT` | fill with a gradient.
`GO_STYLE_FILL_IMAGE` | fill with an image.

### enum GOStyleFlag

    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;

Gives the meaningful fields in `GOStyle`. Anyw combination can be used, except that `GO_STYLE_OUTLINE` and `GO_STYLE_OUTLINE` should never coexist.

`GO_STYLE_OUTLINE` | outline.
`GO_STYLE_FILL` | fill.
`GO_STYLE_LINE` | line.
`GO_STYLE_MARKER` | marker.
`GO_STYLE_FONT` | font.
`GO_STYLE_TEXT_LAYOUT` | text orientaiton.
`GO_STYLE_INTERPOLATION` | curve interpolation.
`GO_STYLE_MARKER_NO_COLOR` | marker with no color.
`GO_STYLE_ALL` | all elements

### GOStyleLine

    typedef struct {
    	/* <0 == no outline,
    	 * =0 == hairline : unscaled, minimum useful (can be bigger than visible) size.
    	 * >0 in pts */
    	double	 	 width;
    	GOLineDashType 	 dash_type;
    	gboolean	 auto_dash;
    	GOColor	 	 color; /* color is used as background for compatibility
    						(pattern == 0 means filled with background color) */
    	GOColor	 	 fore;
    	gboolean 	 auto_color;
    	gboolean 	 auto_fore;
    	gboolean 	 auto_width;
    	GOPatternType	 pattern;
    	cairo_line_cap_t cap;
    	cairo_line_join_t join;
    	double		 miter_limit;
    } GOStyleLine;

double `width`; | line width: <0 == no line, =0 == hairline : unscaled, minimum useful (can be bigger than visible) size. >0 in pts.
GOLineDashType `dash_type`; | GOLineDashType.
gboolean `auto_dash`; | automatic dash type.
GOColor `color`; | color is used as background for compatibility (pattern == 0 means filled with background color).
GOColor `fore`; | second color used for patterned lines.
gboolean `auto_color`; | color is automatic.
gboolean `auto_fore`; | fore is automatic.
gboolean `auto_width`; |
GOPatternType `pattern`; | pattern.
cairo_line_cap_t `cap`; | cap style.
cairo_line_join_t `join`; | join style.
double `miter_limit`; | mitter limit.

### GOStyleMark

    typedef struct {
    	GOMarker *mark;
    	gboolean auto_shape;
    	gboolean auto_outline_color;
    	gboolean auto_fill_color;
    } GOStyleMark;

GOMarker *`mark`; | the used GOMarker.
gboolean `auto_shape`; | automatic `marc`.
gboolean `auto_outline_color`; | automatic outline color.
gboolean `auto_fill_color`; | automatic fill color.

### go_style_apply_theme ()

    void                go_style_apply_theme                (GOStyle *dst,
                                                             GOStyle const *src,
                                                             GOStyleFlag fields);

Merge the attributes from `src` onto the elements of `dst` that were not user assigned (is_auto)

`dst` : | GOStyle
`src` : | GOStyle
`fields` : | the fields to which the copy should be limited

### go_style_assign ()

    void                go_style_assign                     (GOStyle *dst,
                                                             GOStyle const *src);

### go_style_dup ()

    GOStyle *           go_style_dup                        (GOStyle const *style);

Duplicates `style`.

`style` : | a source GOStyle
Returns : | a new GOStyle. [transfer full]

### go_style_fill ()

    void                go_style_fill                       (GOStyle const *style,
                                                             cairo_t *cr,
                                                             gboolean preserve);

### go_style_force_auto ()

    void                go_style_force_auto                 (GOStyle *style);

Sets all auto fields in `style` to `TRUE`.

`style` : | a GOStyle

### go_style_clear_auto ()

    void                go_style_clear_auto                 (GOStyle *style);

Sets all auto fields in `style` to `FALSE`.

`style` : | a GOStyle

### go_style_get_editor ()

    gpointer            go_style_get_editor                 (GOStyle *style,
                                                             GOStyle *default_style,
                                                             GOCmdContext *cc,
                                                             GObject *object_with_style);

Builds the widget used to edit the style.

`style` : | GOStyle
`default_style` : | the style used as default
`cc` : | GOCmdContext
`object_with_style` : | the object owning the style
Returns : | the style editor. [transfer full]

### go_style_get_marker ()

    GOMarker const *    go_style_get_marker                 (GOStyle *style);

Accessor for `style`::marker, without referencing it.

`style` : | GOStyle
Returns : | the style GOMarker. [transfer none]

### go_style_is_auto ()

    gboolean            go_style_is_auto                    (GOStyle *style);

### go_style_is_different_size ()

    gboolean            go_style_is_different_size          (GOStyle const *a,
                                                             GOStyle const *b);

### go_style_is_fill_visible ()

    gboolean            go_style_is_fill_visible            (GOStyle const *style);

### go_style_is_line_visible ()

    gboolean            go_style_is_line_visible            (GOStyle const *style);

### go_style_is_marker_visible ()

    gboolean            go_style_is_marker_visible          (GOStyle const *style);

### go_style_is_outline_visible ()

    gboolean            go_style_is_outline_visible         (GOStyle const *style);

### go_style_new ()

    GOStyle *           go_style_new                        (void);

### go_style_populate_editor ()

    void                go_style_populate_editor            (GOStyle *style,
                                                             GOEditor *editor,
                                                             GOStyle *default_style,
                                                             GOCmdContext *cc,
                                                             GObject *object_with_style,
                                                             gboolean watch_for_external_change);

### go_style_set_cairo_line ()

    gboolean            go_style_set_cairo_line             (GOStyle const *style,
                                                             cairo_t *cr);

### go_style_set_fill_brightness ()

    void                go_style_set_fill_brightness        (GOStyle *style,
                                                             double brightness);

### go_style_set_font ()

    void                go_style_set_font                   (GOStyle *style,
                                                             GOFont const *font);

### go_style_set_font_desc ()

    void                go_style_set_font_desc              (GOStyle *style,
                                                             PangoFontDescription *desc);

### go_style_set_marker ()

    void                go_style_set_marker                 (GOStyle *style,
                                                             GOMarker *marker);

Absorb a reference to `marker` and assign it to `style`.

`style` : | GOStyle
`marker` : | GOMarker

### go_style_set_text_angle ()

    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°].

`style` : | GOStyle
`angle` : | text rotation in degrees