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

Bug #241565 reported by Kjell Magne Fauske
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
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.

Revision history for this message
Kjell Magne Fauske (kjellmf) wrote :
Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.