API Reference for Enthought Tool Suite 3.2.0

Parse SVG <path> data into a list of commands.

Each distinct command will take the form of a tuple (command, data). The command is just the character string that starts the command group in the <path> data, so 'M' for absolute moveto, 'm' for relative moveto, 'Z' for closepath, etc. The kind of data it carries with it depends on the command. For 'Z' (closepath), it's just None. The others are lists of individual argument groups. Multiple elements in these lists usually mean to repeat the command. The notable exception is 'M' (moveto) where only the first element is truly a moveto. The remainder are implicit linetos.

See the SVG documentation for the interpretation of the individual elements for each command.

The main method is parse(text). It can only consume actual strings, not filelike objects or iterators.

Method summary

Methods

© Copyright 2002-2009 Enthought, Inc.