A4

Merge lp://staging/~andrea-gualano/a4/fix-598969 into lp://staging/a4

Proposed by Andrea Gualano
Status: Merged
Merged at revision: 31
Proposed branch: lp://staging/~andrea-gualano/a4/fix-598969
Merge into: lp://staging/a4
Diff against target: 56 lines (+35/-2)
2 files modified
a4lib/presentation.py (+3/-2)
test_images/regression/598969.svg (+32/-0)
To merge this branch: bzr merge lp://staging/~andrea-gualano/a4/fix-598969
Reviewer Review Type Date Requested Status
Andrea Gasparini Approve
Andrea Gualano Needs Resubmitting
Review via email: mp+28584@code.staging.launchpad.net

Commit message

Fix parsing of scale transform

Description of the change

Fix for bug #598969: SVG parser fails on scale transform.

To post a comment you must log in.
Revision history for this message
Andrea Gasparini (gaspa) wrote :

scale() can have also only one parameter, as stated here:
http://www.w3.org/TR/SVG11/coords.html#TransformAttribute

«scale(<sx> [<sy>]), which specifies a scale operation by sx and sy. If <sy> is not provided, it is assumed to be equal to <sx>.»

and if I remember correctly I wrote just the scale(sx) case because Inkscape used only this one. (in the fe tests i did)

Probably we'd want to handle both of these.

review: Needs Fixing
Revision history for this message
Andrea Gasparini (gaspa) wrote :

Infact, if you try test_image/A4_nested_transforms.svg, you'll see the 'testo 3' rect not handled correctly.

Revision history for this message
Andrea Gualano (andrea-gualano) wrote :

Inkscape generates scale(-1,-1) instead of rotate(180)...
Anyway, we definitely want to support both.

34. By Andrea Gualano

Test image contains both 1- and 2-argument scale()

35. By Andrea Gualano

Handle both 1- and 2-argument scale()

Revision history for this message
Andrea Gualano (andrea-gualano) wrote :

Should handle both now.

review: Needs Resubmitting
Revision history for this message
Andrea Gasparini (gaspa) wrote :

Thumb up. great! ;)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches