Path
Object Hierarchy:
Description:
The Path struct contains only private data.
Namespace: Clutter
Package: clutter-1.0
Content:
Properties:
Creation methods:
Methods:
-
public void add_cairo_path (Path cpath)
Add the nodes of the Cairo path to the end of path.
-
public void add_close ()
Adds a CLOSE type node to the path. This
creates a straight line from the last node to the last MOVE_TO type
node.
-
public void add_curve_to (int x_1, int y_1, int x_2, int y_2, int x_3, int y_3)
Adds a CURVE_TO type node to the
path. This causes the actor to follow a bezier from the last node to (@x_3, y_3) using (@x_1, y_1) and
(@x_2,@y_2) as control points.
-
public void add_line_to (int x, int y)
Adds a LINE_TO type node to the path.
This causes the actor to move to the new coordinates in a straight line.
-
public void add_move_to (int x, int y)
Adds a MOVE_TO type node to the path.
This is usually used as the first node in a path. It can also be used in the middle of the path to cause the actor to jump to the new
coordinate.
-
public void add_node (PathNode node)
Adds node to the end of the path.
-
public void add_rel_curve_to (int x_1, int y_1, int x_2, int y_2, int x_3, int y_3)
Same as add_curve_to except the coordinates
are relative to the previous node.
-
public void add_rel_line_to (int x, int y)
Same as add_line_to except the coordinates
are relative to the previous node.
-
public void add_rel_move_to (int x, int y)
Same as add_move_to except the coordinates
are relative to the previous node.
-
public bool add_string (string str)
-
public void clear ()
Removes all nodes from the path.
-
public void foreach (PathCallback callback)
Calls a function for each node of the path.
-
public string get_description ()
Returns a newly allocated string describing the path in the same format as used by
add_string.
-
public uint get_length ()
Retrieves an approximation of the total length of the path.
-
public uint get_n_nodes ()
Retrieves the number of nodes in the path.
-
public void get_node (uint index_, PathNode node)
Retrieves the node of the path indexed by index.
-
public SList<PathNode> get_nodes ()
Returns a SList of
PathNodes. The list should be freed with g_slist_free. The nodes are
owned by the path and should not be freed. Altering the path may cause the nodes in the list to become invalid so you should copy them
if you want to keep the list.
-
public uint get_position (double progress, Knot position)
The value in progress represents a position along the path where 0.0 is the beginning and
1.0 is the end of the path. An interpolated position is then stored in position.
-
public void insert_node (int index_, PathNode node)
Inserts node into the path before the node at the given offset. If index_ is
negative it will append the node to the end of the path.
-
public void remove_node (uint index_)
Removes the node at the given offset from the path.
-
public void replace_node (uint index_, PathNode node)
Replaces the node at offset index_ with node.
-
public bool set_description (string str)
Replaces all of the nodes in the path with nodes described by str. See
add_string for details of the format.
-
public void to_cairo_path (Context cr)
Add the nodes of the ClutterPath to the path in the Cairo context.