Yeah :(
The extension framework (inkex.py) was rewritten to properly handle the unit used for SVG coordinates. That code looked at "inkscape:document-unit" for that... But, by now it is clear that "inkscape:document-unit" means "Display units" and is unrelated to the SVG unit used. OK. So I've changed the extension Python code to now calculate the SVG unit from the document width and viewbox [1]. It falls back to 'px' units for any errors, for example when there is no viewbox defined. This should make it work for legacy documents.
Thanks for testing, Johan
( Note that legacy documents use 90dpi, whereas others use 96dpi. I see no possible way to fix this, other than looking at the Inkscape version number in the SVG upon loading the file into newer 96dpi-versions of Inkscape... )
[1] https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13750/ https://bazaar.launchpad.net/%7Einkscape.dev/inkscape/trunk/revision/13750/
On 23-11-2014 20:38, Josh Andler wrote:
Nevermind the optimism about it possibly being just in the rect tool... it manifests with Extensions too (thanks to suv again for finding).
Same steps of changing document to px for trunk or mm for patched 0.91. Then run Extensions>Render>Gear>Gear... (or another extension which uses units) and it will be scaled incorrectly as well.
Cheers, Josh
On Sun, Nov 23, 2014 at 10:09 AM, Josh Andler <scislac@...400...> wrote:
I hadn't turned up issues with my own testing yesterday, but it's not surprising that suv was able to do so. :) Note the following does not happen in unpatched 0.91.
With patched 0.91, behavior is incorrect in the following scenario:
- Launch patched 0.91.x with default new prefs (default new doc)
- Open Document Properties, change Default units to mm
- Draw a rect, then change the size numerically in the Rectangle Tool
Controls bar to something round like 100x100 (ruler will show it's not as expected) 4) Switch to Selector Tool and look at the width and height in the Controls Bar
Symptoms: The rect is nowhere near the correct size on canvas. The rectangle tool reports a different size than selector tool & rulers.
It does appear that the root issue happens in trunk as well (it manifests differently though as the scaling looks to be off in the other direction). In Trunk for step 2 switch to px instead. It seems like this issue is probably worth looking into since it exists in both branches (0.91 possibly just papered over) and could be rectangle tool specific.
Cheers, Josh
On Sat, Nov 22, 2014 at 10:44 AM, Josh Andler <scislac@...400...> wrote:
Thanks for looking into this. I will do some tests, apply it against my copy of 0.91.x, do the same tests again, and report back.
Cheers, Josh
On Sat, Nov 22, 2014 at 10:40 AM, Johan Engelen <jbc.engelen@...2592...> wrote:
On 22-11-2014 19:24, Johan Engelen wrote:
On 21-11-2014 21:17, Josh Andler wrote:
On Fri, Nov 21, 2014 at 12:09 PM, Johan Engelen <jbc.engelen@...2592...> wrote: > So this is what confuses me then perhaps? > People want it to work as setting the default unit for the UI? If I'm not mistaken, that is all it did in 0.41-0.48.5.
Ok, so shall I then disable the change to viewbox upon Default unit change? It is pretty straightforward to do.
See rev. 13748 in trunk.
-J
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.cl... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel