CanvasItemSimple
Object Hierarchy:
Description:
public class CanvasItemSimple :
Object,
CanvasItem
CanvasItemSimple is used as a base class for all of the standard canvas items.
It can also be used as the base class for new custom canvas items.
It provides default implementations for many of the CanvasItem methods.
For very simple items, all that is needed is to implement the create_path method. (
CanvasEllipse, CanvasRect and
CanvasPath do this.)
More complicated items need to implement the update, paint and is_item_at methods instead. (
CanvasImage, CanvasPolyline,
CanvasText and CanvasWidget do this.)
They may also need to override some of the other GooCanvasItem methods such as set_canvas, set_parent or
allocate_area if special code is needed. (CanvasWidget does this to make sure
the Widget is embedded in the Canvas
widget correctly.)
Content:
Properties:
Creation methods:
Methods:
- public void changed (bool recompute_bounds)
This function is intended to be used by subclasses of
CanvasItemSimple.
- public bool check_in_path (double x, double y, Context cr, CanvasPointerEvents pointer_events)
This function is intended to be used by subclasses of
CanvasItemSimple.
- public void check_style ()
This function is intended to be used by subclasses of
CanvasItemSimple, typically in their update or get_requested_area methods.
- public double get_line_width ()
Gets the item's line width.
- public void get_path_bounds (Context cr, out CanvasBounds bounds)
This function is intended to be used by subclasses of
CanvasItemSimple, typically in their update or get_requested_area methods.
- public void paint_path (Context cr)
This function is intended to be used by subclasses of
CanvasItemSimple.
- public virtual void simple_create_path (Context cr)
simple subclasses that draw basic shapes and paths only need to
override this one method.
- public virtual bool simple_is_item_at (double x, double y, Context cr, bool is_pointer_event)
subclasses should override this to do hit-testing.
- public virtual void simple_paint (Context cr, CanvasBounds bounds)
subclasses should override this to paint their item.
- public virtual void simple_update (Context cr)
subclasses should override this to calculate their new bounds, in
user space.
- public void user_bounds_to_device (Context cr, CanvasBounds bounds)
This function is intended to be used by subclasses of
CanvasItemSimple, typically in their update or get_requested_area methods.
- public void user_bounds_to_parent (Context cr, CanvasBounds bounds)
This function is intended to be used by subclasses of
CanvasItemSimple, typically in their get_requested_area method.
Fields:
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface Goo.CanvasItem