Class: GOffice::CanvasStyledItem

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

#cairo_line=(cr) ⇒ Boolean

Prepares the cairo context cr to draw a line according to the item style and canvas scale. The line width is scaled only if the scale-line-width property is set to true. This function calls go_styled_object_set_cairo_line().

If the item drawing used goc_group_cairo_transform(), scale-line-width should be false to avoid scaling twice, or go_styled_object_set_cairo_line() should be called directly instead.

Parameters:

  • cr (cairo::Context)

    #cairo_t

Returns:

  • (Boolean)

    true if the line is not invisible

#scale_line_widthBoolean

This function returns true if the line width needs to be scaled. It will always return false if the line width is 0.

Returns:

  • (Boolean)

    whether the line width needs to be scaled.

#scale_line_width=(scale_line_width) ⇒ Boolean

Parameters:

  • scale_line_width (Boolean)

Returns:

  • (Boolean)

    scale-line-width

  • (Boolean)

    scale-line-width

#scale_line_width?Boolean

Returns scale-line-width.

Returns:

  • (Boolean)

    scale-line-width

#styleGOffice::Style

Returns style.

Returns:

#style=(style) ⇒ GOffice::Style

Parameters:

Returns: