Query (command line) reports wrong information

Bug #168678 reported by Bug Importer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Won't Fix
Undecided
Unassigned

Bug Description

Hello,

It seems that -Y (--query-Y) sometime reports wrong information. Indeed,
for a same SVG, the result is different from the one which appears in the
'Export Bitmap' dialog when you click on drawing.

For example: inkscape -Y mysvg.svg = 9
but "Export Bitmap" - "Drawing" - "y0" = 12

Also, the correct one is always the one given by the UI.

-X, -H, -W are always the same.

This error was introduced by 0.45. I tested the 0.43 and the error is not
there.

Tristan

Tags: cli exporting
Revision history for this message
Bug Importer (bug-importer) wrote :
Revision history for this message
Tristanleboss (tristanleboss) wrote :

Originator: NO

Hello again,

To be sure, I just installed v0.44.

v0.44 reports :
ubuntu@ubuntu:~/Desktop$ inkscape -Y 102.svg
17.892
(UI says 9.983)

instead v0.43 reports :
ubuntu@ubuntu:~/Desktop$ inkscape -Y 102.svg
9.983
(UI says 9.983)

So the bug was introduced by 0.44.

Hope, this will help. But the main fact I don't understand is why the UI
tells the right answer and not the command line ? I thought the same code
was used ...

Tristan

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Originator: NO

This is not a bug. From release notes for 0.44:

    * The --query-* command line parameters now return the true SVG
bounding box of the object instead of the Inkscape coordinate system bbox
(with inverted Y axis). The new behavior makes more sense for scripting use
of Inkscape.

Eventually, we plan to flip the UI coordinates too, so that there won't be
any discrepancy. For now, the UI shows coordinate origin in the lower left
corner, whereas per SVG it must be the upper left corner. This is a problem
we inherited from sodipodi and it will be fixed eventually. For now, at
least the --query commands are fixed to match the actual SVG code.

Revision history for this message
knb (knb) wrote :

I tried a similar command as the original poster with Inkscape 0.46 (Apr 8 2009) and the 0.47rc that is in ubuntu karmic koala aka 9.10.

Regarding the "improvement" from 0.44 : There has not been any progress on this one.

The false y-coordinate - it is now a serious misfeature. That makes it *harder* in some casing to script.
For instance, when you use inscape --export-png --export-area=x0:y0:x1:y1 you cannot use the y coordinate that you can produce with inkscape --query-id=path123

You have to correct the y coodinate with something like the document height, but not really the full document height but a little amount subtracted.

There should be an additional command line option to specify the coordinate system (svg or inkscape-legacy). Maybe I'll file an enhancement request (very similar to the text in this very comment).

su_v (suv-lp)
tags: added: cli
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.