parseTransform() in simpletransform.py does not parse valid transformations

Bug #241565 reported by Kjell Magne Fauske on 2008-06-20
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Undecided
Unassigned

Bug Description

The parseTransform(transf,mat) function in simpletransform.py in the extension directory, contains several bugs. It should be able to parse all valid SVG transforms, but fails parsing basic expressions like:

matrix = parseTransform('rotate(10)')
matrix = parseTransform('skewY(10)')
matrix = parseTransform('translate(10 10)')
matrix = parseTransform(' rotate(10)')
matrix = parseTransform('translate(700,210) rotate(-30)')

I have attached a patch and unit tests that addresses all the above issues.

Kjell Magne Fauske (kjellmf) wrote :

I have written a few unit tests to ensure that the patch catches all of the parsing bugs. Note that the test only tests the parsing. The validity of the numerical output is not verified.

description: updated
bbyak (buliabyak) wrote :

thanks, committed to svn

Changed in inkscape:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers