GOStyle

GOStyle

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GOStyle
        ╰── GogStyle

Implemented Interfaces

GOStyle implements GOPersist.

Includes

#include <goffice/utils/go-style.h>

Description

Functions

go_style_new ()

GOStyle *
go_style_new (void);


go_style_dup ()

GOStyle *
go_style_dup (GOStyle const *style);

Duplicates style .

Parameters

style

a source GOStyle

 

Returns

a new GOStyle


go_style_assign ()

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


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)

Parameters

dst

GOStyle

 

src

GOStyle

 

fields

the fields to which the copy should be limited

 

go_style_set_marker ()

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

Absorb a reference to marker and assign it to style .

Parameters

style

GOStyle

 

marker

GOMarker

 

go_style_set_font_desc ()

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


go_style_set_font ()

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


go_style_set_fill_brightness ()

void
go_style_set_fill_brightness (GOStyle *style,
                              double brightness);


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

Parameters

style

GOStyle

 

angle

text rotation in degrees

 

go_style_is_different_size ()

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


go_style_is_marker_visible ()

gboolean
go_style_is_marker_visible (GOStyle const *style);


go_style_is_line_visible ()

gboolean
go_style_is_line_visible (GOStyle const *style);


go_style_is_outline_visible ()

gboolean
go_style_is_outline_visible (GOStyle const *style);


go_style_is_fill_visible ()

gboolean
go_style_is_fill_visible (GOStyle const *style);


go_style_force_auto ()

void
go_style_force_auto (GOStyle *style);


go_style_get_editor ()

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


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_create_cairo_pattern ()

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.

Parameters

style

GOStyle

 

cr

a cairo context

 

Returns

the pattern or NULL if it could not be created.


go_style_set_cairo_line ()

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


go_style_get_marker ()

GOMarker const *
go_style_get_marker (GOStyle *style);

Accessor for style ::marker, without referencing it.

Parameters

style

GOStyle

 

Returns

the style GOMarker.

Types and Values

GOStyle

typedef struct _GOStyle GOStyle;


enum GOStyleFlag

Members

GO_STYLE_OUTLINE

   

GO_STYLE_FILL

   

GO_STYLE_LINE

   

GO_STYLE_MARKER

   

GO_STYLE_FONT

   

GO_STYLE_TEXT_LAYOUT

   

GO_STYLE_INTERPOLATION

   

GO_STYLE_MARKER_NO_COLOR

   

GO_STYLE_ALL

   

enum GOStyleFill

Members

GO_STYLE_FILL_NONE

   

GO_STYLE_FILL_PATTERN

   

GO_STYLE_FILL_GRADIENT

   

GO_STYLE_FILL_IMAGE

   

enum GOImageType

Members

GO_IMAGE_STRETCHED

   

GO_IMAGE_WALLPAPER

   

GO_IMAGE_CENTERED

   

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;
	GOPatternType	 pattern;
	cairo_line_cap_t cap;
	cairo_line_join_t join;
	double		 miter_limit;
} GOStyleLine;


GOStyleMark

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