CanvasItemModel defines the interface that models for canvas items must implement, and contains methods
for operating on canvas item models.
<note><para> The Model/View canvas feature may be removed in a future version of GooCanvas. </para></note>
- public abstract void add_child (CanvasItemModel child, int position)
Adds a child at the given stack position.
- public void animate (double x, double y, double scale, double degrees, bool absolute, int duration, int step_time, CanvasAnimateType type)
Animates a model from its current position to the given offsets, scale
and rotation.
- public abstract unowned CanvasItem create_item (Canvas canvas)
- public int find_child (CanvasItemModel child)
Attempts to find the given child with the container's stack.
- public abstract unowned CanvasItemModel get_child (int child_num)
Gets the child at the given stack position.
- public void get_child_properties (CanvasItemModel child, ...)
Gets the values of one or more child properties of child
.
- public void get_child_properties_valist (CanvasItemModel child, va_list var_args)
Gets the values of one or more child properties of child
.
- public abstract void get_child_property (CanvasItemModel child, uint property_id, Value value, ParamSpec pspec)
Gets a child property of child
.
- public abstract int get_n_children ()
Gets the number of children of the container.
- public abstract unowned CanvasItemModel get_parent ()
Gets the parent of the given model.
- public bool get_simple_transform (out double x, out double y, out double scale, out double rotation)
This function can be used to get the position, scale and rotation of
an item model, providing that the model has a simple transformation matrix (e.
- public abstract unowned CanvasStyle get_style ()
Gets the model's style.
- public abstract bool get_transform (out Matrix transform)
Gets the transformation matrix of an item model.
- public bool is_container ()
Tests to see if the given item model is a container.
- public void lower (CanvasItemModel? below)
Lowers a model in the stacking order.
- public abstract void move_child (int old_position, int new_position)
Moves a child to a new stack position.
- public void raise (CanvasItemModel? above)
Raises a model in the stacking order.
- public void remove ()
Removes a model from its parent.
- public abstract void remove_child (int child_num)
Removes the child at the given position.
- public void rotate (double degrees, double cx, double cy)
Rotates the model's coordinate system by the given amount, about the
given origin.
- public void scale (double sx, double sy)
Scales the model's coordinate system by the given amounts.
- public void set_child_properties (CanvasItemModel child, ...)
Sets the values of one or more child properties of child
.
- public void set_child_properties_valist (CanvasItemModel child, va_list var_args)
Sets the values of one or more child properties of child
.
- public abstract void set_child_property (CanvasItemModel child, uint property_id, Value value, ParamSpec pspec)
Sets a child property of child
.
- public abstract void set_parent (CanvasItemModel parent)
This function is only intended to be used when implementing new canvas
item models (specifically container models such as CanvasGroupModel).
- public void set_simple_transform (double x, double y, double scale, double rotation)
A convenience function to set the item model's transformation matrix.
- public abstract void set_style (CanvasStyle style)
Sets the model's style, by copying the properties from the given
style.
- public abstract void set_transform (Matrix? transform)
Sets the transformation matrix of an item model.
- public void skew_x (double degrees, double cx, double cy)
Skews the model's coordinate system along the x axis by the given
amount, about the given origin.
- public void skew_y (double degrees, double cx, double cy)
Skews the model's coordinate system along the y axis by the given
amount, about the given origin.
- public void stop_animation ()
Stops any current animation for the given model, leaving it at its
current position.
- public void translate (double tx, double ty)
Translates the origin of the model's coordinate system by the given
amounts.