add_string


Description:

public bool add_string (string str)

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 a MOVE_TO node. Takes one pair of coordinates. - `L`: Adds a LINE_TO node. Takes one pair of coordinates. - `C`: Adds a CURVE_TO node. Takes three pairs of coordinates. - `z`: Adds a 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.

Parameters:

this

a Path

str

a string describing the new nodes

Returns:

true is the path description was valid or false otherwise.