Class: GOffice::Marker

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(initial_shape, default_shape) ⇒ Gtk::Widget

Creates a new marker selector.

Parameters:

Class Method Details

.selector_set_auto_fill(selector, auto_fill) ⇒ nil

cross, x, or asterisk.

Parameters:

  • selector (GOffice::Selector)

    a #GOSelector

  • auto_fill (Boolean)

    whether to use a transparent color for opened markers such as

Returns:

  • (nil)

.selector_set_colors(selector, outline, fill) ⇒ nil

Updates swatch colors of selector.

Parameters:

  • selector (GOffice::Selector)

    a #GOSelector

  • outline (GOffice::Color)

    outline color

  • fill (GOffice::Color)

    fill color

Returns:

  • (nil)

.selector_set_shape(selector, shape) ⇒ nil

Updates marker shape of selector.

Parameters:

Returns:

  • (nil)

.shape_as_str(shape) ⇒ String

Parameters:

Returns:

  • (String)

.shape_from_str(name) ⇒ GOffice::MarkerShape

Parameters:

  • name (String)

Returns:

Instance Method Details

#assign(src) ⇒ nil

Parameters:

Returns:

  • (nil)

#create_cairo_surface(cr, scale, width, height) ⇒ cairo::Surface

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

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:

  • (cairo::Surface)

    a newly created #cairo_surface_t. This surface should be destroyed using cairo_surface_destroy after use.

#dupGOffice::Marker

Duplicates src.

Returns:

#fill_colorGOffice::Color

Returns:

  • (GOffice::Color)

#fill_color=(color) ⇒ nil

Parameters:

  • color (GOffice::Color)

Returns:

  • (nil)

#is_closed_shapeBoolean

Returns:

  • (Boolean)

#outline_colorGOffice::Color

Returns:

  • (GOffice::Color)

#outline_color=(color) ⇒ nil

Parameters:

  • color (GOffice::Color)

Returns:

  • (nil)

#outline_widthFloat

Returns:

  • (Float)

#render(cr, x, y, scale) ⇒ nil

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

Parameters:

  • cr (cairo::Context)

    a cairo context

  • x (Float)

    x position

  • y (Float)

    y position

  • scale (Float)

    current scale

Returns:

  • (nil)

#shape=(shape) ⇒ nil

Parameters:

Returns:

  • (nil)

#sizeInteger

Returns:

  • (Integer)

#size=(size) ⇒ nil

Parameters:

  • size (Integer)

Returns:

  • (nil)