Method
ClutterPathadd_string
Declaration [src]
gboolean
clutter_path_add_string (
ClutterPath* path,
const gchar* str
)
Description [src]
Adds new nodes to the end of the path as described in str
. The
format is a subset of the SVG path format. Each node is represented
by a letter and is followed by zero, one or three pairs of
coordinates. The coordinates can be separated by spaces or a
comma. The types are:
M
: Adds aCLUTTER_PATH_MOVE_TO
node. Takes one pair of coordinates.L
: Adds aCLUTTER_PATH_LINE_TO
node. Takes one pair of coordinates.C
: Adds aCLUTTER_PATH_CURVE_TO
node. Takes three pairs of coordinates.z
: Adds aCLUTTER_PATH_CLOSE
node. No coordinates are needed.
The M, L and C commands can also be specified in lower case which means the coordinates are relative to the previous node.
For example, to move an actor in a 100 by 100 pixel square centered on the point 300,300 you could use the following path:
M 250,350 l 0 -100 L 350,250 l 0 100 z
If the path description isn’t valid FALSE
will be returned and no
nodes will be added.