unexpected results when changing document units on a loaded svg file that already has a viewBox defined

Bug #1280684 reported by Alvin Penner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Unassigned

Bug Description

- Windows XP, Inkscape rev 12991
- attached is an svg file from Bug 803791
- it has the following properties
     width="2500"
     height="1437.5"
     viewBox="-75 -50 465.04091 170.99168"
     default document units = px

Revision history for this message
Alvin Penner (apenner) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

- upon changing the document units from px to mm one would normally expect the reported size of all objects to change by a factor of 25.4/90 = .2822222, so the size of the document would change from

(2500 x 1437.5) px to (705.5 x 405.7) mm

Instead, when the document units are changed to mm, one gets the file Wrongpaths_mm.svg.
The size of the black rectangle which represents the original document, is now reported as being 131.245 mm by 75.466 mm. (This is coming from the W: and H: spinboxes on the top menu after pushing F1.) This is much smaller than expected. These numbers are somewhat consistent with taking the viewBox width and scaling it by .2822222 but that is not what was expected.

su_v (suv-lp)
tags: added: regression units viewbox
Revision history for this message
su_v (suv-lp) wrote :

On OS X 10.7.5:
- not reproduced with Inkscape 0.48.4
- reproduced with trunk r13029

Reminds me of bug #1236257 (similar effect on drawing content if default units are changed).

Changed in inkscape:
importance: Undecided → High
milestone: none → 0.91
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

a partial fix has been committed to rev 13034. When changing document units, If the viewbox already exists, then it will be rescaled to produce the new viewbox. If it does not exist then the page size will be used as before.

there is still a remaining problem, namely offset of the origin during the rescaling. This appears to be a separate issue.

Revision history for this message
Alvin Penner (apenner) wrote :

fix for offset problem has been committed to rev 13050

Changed in inkscape:
status: Confirmed → Fix Committed
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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