goocanvas.ItemSimple
goocanvas.ItemSimple — The base class for the standard canvas items.
Synopsis
class goocanvas.ItemSimple(gobject.GObject):
def check_in_path(x , y , cr , pointer_events )
def get_path_bounds(cr , bounds )
def paint_path(cr )
def set_fill_options(cr )
def set_stroke_options(cr )
def set_style(style )
def user_bounds_to_device(cr , bounds )
|
Ancestry
+-- gobject.GObject
+-- goocanvas.ItemSimple
goocanvas.ItemSimple Properties
Known Implementation
goocanvas.ItemSimple
is implementated by
goocanvas.Rect
goocanvas.Ellipse
goocanvas.Path
goocanvas.Polyline
goocanvas.Text
goocanvas.Image
goocanvas.Group
Implemented Interfaces
goocanvas.ItemSimple
implements
goocanvas.Item
Description
goocanvas.ItemSimple
is used as a base class for the standard canvas items.
It supports a number of style properties, such as "stroke-color", "fill-color" and "line-width".
It also provides a number of utility functions that subclasses can use.
Methods
goocanvas.ItemSimple.check_in_path
def check_in_path(x
, y
, cr
, pointer_events
)
x : | the x coordinate of the point. |
y : | the y coordinate of the point. |
cr : | a cairo context. |
pointer_events : | specifies which parts of the path to check. |
Returns: | True if the given point is in the current path. |
Checks if the given point is in the current path.
goocanvas.ItemSimple.get_path_bounds
def get_path_bounds(cr
, bounds
)
cr : | a cairo context. |
bounds : | the GooCanvasBounds struct to store the resulting bounding box. |
Calculates the bounds of the current path in device space, storing the results in the given GooCanvasBounds struct.
goocanvas.ItemSimple.paint_path
def paint_path(cr
)
Paints the current path, using the item's style settings.
goocanvas.ItemSimple.set_fill_options
def set_fill_options(cr
)
Sets the fill options of the cairo context, according to the item's style settings.
goocanvas.ItemSimple.set_stroke_options
def set_stroke_options(cr
)
Sets the stroke options of the cairo context, according to the item's style settings.
goocanvas.ItemSimple.set_style
def set_style(style
)
Sets the style of the item.
goocanvas.ItemSimple.user_bounds_to_device
def user_bounds_to_device(cr
, bounds
)
cr : | a cairo context. |
bounds : | the bounds of the item, in the item's coordinate space. |
Converts the item's bounds to a bounding box in device space.