GOffice.Marker

g GObject.Object GObject.Object GOffice.Marker GOffice.Marker GObject.Object->GOffice.Marker

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

selector_new (initial_shape, default_shape)

class

selector_set_auto_fill (selector, auto_fill)

class

selector_set_colors (selector, outline, fill)

class

selector_set_shape (selector, shape)

class

shape_as_str (shape)

class

shape_from_str (name)

assign (src)

create_cairo_surface (cr, scale, width, height)

dup ()

get_fill_color ()

get_outline_color ()

get_outline_width ()

get_shape ()

get_size ()

is_closed_shape ()

render (cr, x, y, scale)

set_fill_color (color)

set_outline_color (color)

set_shape (shape)

set_size (size)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class GOffice.Marker(**kwargs)
Bases:

GObject.Object

Abstract:

No

classmethod new()
Return type:

GOffice.Marker

classmethod selector_new(initial_shape, default_shape)
Parameters:
Returns:

a new Gtk.Widget.

Return type:

Gtk.Widget

Creates a new marker selector.

classmethod selector_set_auto_fill(selector, auto_fill)
Parameters:
classmethod selector_set_colors(selector, outline, fill)
Parameters:

Updates swatch colors of selector.

classmethod selector_set_shape(selector, shape)
Parameters:

Updates marker shape of selector.

classmethod shape_as_str(shape)
Parameters:

shape (GOffice.MarkerShape) –

Return type:

str

classmethod shape_from_str(name)
Parameters:

name (str) –

Return type:

GOffice.MarkerShape

assign(src)
Parameters:

src (GOffice.Marker) –

create_cairo_surface(cr, scale, width, height)
Parameters:
  • cr (cairo.Context) – a cairo context

  • scale (float) – current context scale

  • width (float) – a placeholder for the surface width

  • height (float) – a placeholder for the surface height

Returns:

a newly created cairo.Surface. This surface should be destroyed using cairo_surface_destroy after use.

Return type:

cairo.Surface

Creates a new cairo surface similar to the current target of cr, and render self on it. center will contain the coordinate of the center of the surface.

dup()
Returns:

the duplicated marker.

Return type:

GOffice.Marker

Duplicates self.

get_fill_color()
Return type:

int

get_outline_color()
Return type:

int

get_outline_width()
Return type:

float

get_shape()
Return type:

GOffice.MarkerShape

get_size()
Return type:

int

is_closed_shape()
Return type:

bool

render(cr, x, y, scale)
Parameters:

Renders self onto the cairo target, using x and y for the position.

set_fill_color(color)
Parameters:

color (int) –

set_outline_color(color)
Parameters:

color (int) –

set_shape(shape)
Parameters:

shape (GOffice.MarkerShape) –

set_size(size)
Parameters:

size (int) –