GOffice.Pattern

Fields

Name

Type

Access

Description

back

int

r/w

background color.

fore

int

r/w

foreground color.

pattern

int

r/w

A GOffice.PatternType specifying what kind of pattern to use.

Methods

class

as_str (pattern)

class

from_str (name)

class

selector_new (initial_type, default_type)

class

selector_set_colors (selector, foreground, background)

create_cairo_pattern (cr)

is_solid (color)

set_solid (fore)

Details

class GOffice.Pattern
classmethod as_str(pattern)
Parameters:

pattern (GOffice.PatternType) –

Return type:

str

classmethod from_str(name)
Parameters:

name (str) –

Return type:

GOffice.PatternType

classmethod selector_new(initial_type, default_type)
Parameters:
Returns:

a new Gtk.Widget.

Return type:

Gtk.Widget

Creates a new pattern selector.

classmethod selector_set_colors(selector, foreground, background)
Parameters:

Updates swatch colors of selector.

create_cairo_pattern(cr)
Parameters:

cr (cairo.Context) – a cairo context

Returns:

a cairo pattern object corresponding to self parameters.

Return type:

cairo.Pattern

is_solid(color)
Parameters:

color (int) – #GOColor

Returns:

if self is solid, and stores the color in color. If self is not solid color is not touched.

Return type:

bool

set_solid(fore)
Parameters:

fore (int) – a #GOColor

Makes self a solid pattern with colour fore.