dimensions and positions of objects not reading correctly

Bug #1391214 reported by Dave Lawrence
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
librsvg (Ubuntu)
New
Low
Unassigned

Bug Description

Hi,

I am using inkscape to create a SVG files containing multiple objects and rsvg to then render these via cairo.

I am using rsvg_handle_get_dimensions_sub and position_sub() to read the (x,y) and (w,h) for the objects which are then used to translate and scale cairo before using rsvg_handle_render_cairo_sub() to render the object.

I am running into anomalies when reading this attributes. I have attached a stripped down source for a simple utility which 'walks' the XML of the file and calls the two functions to dump out all the objects in the file.

I have also attached a sample SVG file created with inkscape with a single rectangle of 45x20px on a canvas of 100x100px

Running svgsize on this produces:

$ ./svgsize /tmp/inkscape.svg
svg : svg2 100x 100 ( 0, 0)
defs : defs4 0x 0 ( 0, 0)
namedview : base 0x 0 ( 0, 0)
grid : grid4469 0x 0 ( 0, 0)
metadata : metadata7 0x 0 ( 0, 0)
g : layer1 50x1047 ( 0,-1022)
rect : rect4471 50x1047 ( 0,-1022)

with scrambled sizes and positions for the rect.

If I load the file into karbon (the KDE editor) and save it (with no other modifications), svgsize produces the correct numbers:

$ ./svgsize /tmp/karbon1.svg
g : layer1 45x 20 ( 5, 5)
rect : rect4471 45x 20 ( 5, 5)

Loading this back into Inkscape and saving it out again, and the original values are shown.

I have tried this on inkscape stable 0.48 and the development 0.91

I am using rsvg 2.36.1-0ubuntu1 from precise. I get the same problem with trusty.

Thanks,

Revision history for this message
Dave Lawrence (dl-alphawave) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in librsvg (Ubuntu):
importance: Undecided → Low
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.