Class: GOffice::CanvasGroup

Inherits:
CanvasItem show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from CanvasItem

#bounds_changed, #canvas, #canvas=, #copy, #destroy, #distance, #draw, #draw_region, #duplicate, #get_bounds, #grab, #hide, #initialize, #invalidate, #is_visible, #lower, #lower_to_bottom, #operator, #operator=, #parent, #parent=, #raise, #raise_to_top, #set, #show, #style_context, #transform=, #ungrab, #visible=, #window

Constructor Details

This class inherits a constructor from GOffice::CanvasItem

Instance Method Details

#add_child(item) ⇒ nil

Adds item as a new child to parent.

Parameters:

Returns:

  • (nil)

#adjust_bounds(x0, y0, x1, y1) ⇒ nil

Adds group horizontal offset to x0 and x1, and vertical offset to y0 and y1. This function is called recursively so that when returning x0, y0, x1, and y1 are absolute coordinates in canvas space,

Parameters:

  • x0 (Float)

    first horizontal coordinate

  • y0 (Float)

    first vertical coordinate

  • x1 (Float)

    last horizontal coordinate

  • y1 (Float)

    last vertical coordinate

Returns:

  • (nil)

#adjust_coords(x, y) ⇒ nil

Adds group horizontal offset to x0, and vertical offset to y0. This function is called recursively so that when returning x0 and y0 are absolute coordinates in canvas space,

Parameters:

  • x (Float)

    horizontal coordinate

  • y (Float)

    vertical coordinate

Returns:

  • (nil)

#cairo_transform(cr, x, y) ⇒ nil

Translates cr current context so that operations start at (x,y), which are group relative coordinates, and is scaled according to the containing Goc::Canvas current scale (see goc_canvas_get_pixels_per_unit()). The translation takes all group ancestors into account.

This function does not call cairo_save().

Parameters:

  • cr (cairo::Context)

    #cairo_t

  • x (Float)

    horizontal coordinate

  • y (Float)

    vertical coordinate

Returns:

  • (nil)

#childrenArray<GOffice::CanvasItem>

the items in group.

Returns:

#clearnil

Destroys all group children.

Returns:

  • (nil)

#find_child(item) ⇒ Integer

Returns The index of item in group, or -1 if item is not in group.

Parameters:

Returns:

  • (Integer)

    The index of item in group, or -1 if item is not in group.

#freeze(freeze) ⇒ nil

Parameters:

  • freeze (Boolean)

Returns:

  • (nil)

#get_child(n) ⇒ GOffice::CanvasItem

group or nil if n is too big.

Parameters:

  • n (Integer)

    number

Returns:

#newGOffice::CanvasGroup

Creates a new Goc::Group as a child of parent.

Returns:

#remove_child(item) ⇒ nil

Removes item from parent. This function will fail if item is not a child of parent.

Parameters:

Returns:

  • (nil)

#set_clip_path(clip_path, clip_rule) ⇒ nil

Clips the drawing inside path.

Parameters:

  • clip_path (GOffice::Path)

    #GOPath

  • clip_rule (cairo::FillRule)

    #cairo_fill_rule_t

Returns:

  • (nil)

#xFloat

Returns x.

Returns:

  • (Float)

    x

#x=(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

    x

  • (Float)

    x

#yFloat

Returns y.

Returns:

  • (Float)

    y

#y=(y) ⇒ Float

Parameters:

  • y (Float)

Returns:

  • (Float)

    y

  • (Float)

    y