Home | Trees | Indices | Help |
---|
|
Module or simpylying input SVG file structure. In many converters SVG
files are created with preserving groups of objects. It results in
generating lot of g
objets. Each of nested g
may have own transformation matrix. What is more, most nested object
(text, path, line, etc. may have its own transformation matrix defined).
Nesting all those transformation causes lot of confusion and dissalows
extracting filnal coordinates of objects in a direct way.
This modlule applies all nested transfomarions and leaves objects with their final coordinates allowing further modules direct extraction of coordinates and dimensions.
Note: Only absolute coordinates (capital letters in segmants names) are parsed properly.
Import Graph |
Currently only translate and scale transformations are supprted.
re_trd - transformations dictionary:
Usage exapmle:
>>> import svgfix >>> _dev_fix_img(dom_svg_object)
See Also: http://www.w3.org/TR/SVG/coords.html#NestedTransformations
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
|
Note: Subsequent transformations should be separated by one or more whitespace chars. See Also: Details of transforming SVG objects: http://www.w3.org/TR/SVG/coords.html |
|
|
|
|
Requires:
|
Requires:
To Do: In final version all polylines should be broken into lines. It is important because of further line <-> label assingment. Currenty, polylines are not broken into pieces. |
Requires: Segments of paths has to be separated by whitespace so we split 'd' string by whitespace. Funtion transforms all points in path one by one using provided transformation matrix. |
|
|
Note: New attributes and their values are defined manually in configuration module. Reason is that they differ among atlases and (esspecially) converters. |
|
|
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Mar 20 14:31:34 2013 | http://epydoc.sourceforge.net |