Path
Object Hierarchy:
Description:
Namespace: Gegl
Package: gegl-0.3
Content:
Static methods:
- public static void add_type (char type, int items, string description)
Adds a new type to the path system, FIXME this should probably return something on registration conflicts, for now it expects all registered paths to be aware of each other.
Creation methods:
- public Path ()
Creates a new Path with no nodes.
- public Path.from_string (string instructions)
Creates a new Path with the nodes described in the string
instructions
.
Methods:
- public void @foreach (NodeFunction each_item)
Execute a provided function for every node in the path (useful for drawing and otherwise traversing a path.
- public bool calc (double pos, out double x, out double y)
Compute the coordinates of the path at the
position
(length measured from start of path, not including discontinuities). - public int calc_y_for_x (double x, out double y)
Compute a corresponding y coordinate for a given x input coordinate, returns 0 if computed correctly and -1 if the path doesn't exist for the specified x coordinate.
- public void clear ()
Remove all nods from a this.
- public double closest_point (double x, double y, out double on_path_x, out double on_path_y, out int node_pos_before)
Figure out what and where on a path is closest to arbitrary coordinates.
- public void foreach_flat (NodeFunction each_item)
Execute a provided function for the segments of a poly line approximating the path.
- public void freeze ()
Make the
GeglPath
stop firing signals as it changes must be paired with a thaw for the signals to start again. - public void get_bounds (out double min_x, out double max_x, out double min_y, out double max_y)
Compute the bounding box of a path.
- public double get_length ()
Returns the total length of the path.
- public void get_matrix (out unowned Matrix3 matrix)
Get the transformation matrix of the path.
- public int get_n_nodes ()
Retrieves the number of nodes in the path.
- public bool get_node (int index, out PathItem node)
Retrieve the node of the path at position
pos
. - public void insert_node (int pos, PathItem node)
Insert the new node
node
at positionpos
in this. - public bool is_empty ()
Check if the path contains any nodes.
- public void parse_string (string instructions)
Parses
instructions
and appends corresponding nodes to path ( callgegl_path_clean
first if you want to replace the existing path. - public void remove_node (int pos)
Removes the node number
pos
in this . - public void replace_node (int pos, PathItem node)
Replaces the exiting node at position
pos
in this. - public void set_matrix (Matrix3 matrix)
Set the transformation matrix of the path.
- public void thaw ()
Restart firing signals (unless the path has been frozen multiple times).
- public string to_string ()
Serialize the paths nodes to a string.
Signals:
- public signal void changed (void* object)
Inherited Members:
All known members inherited from class GLib.Object