GNOME Bugzilla – Bug 564527
rsvg_handle_get_dimensions_sub weird behaviour
Last modified: 2011-04-16 20:02:16 UTC
I'm getting weird behaviour from rsvg_handle_get_dimensions_sub, namely width and height that are greater than what was returned by rsvg_handle_get_dimensions or by rsvg_handle_get_dimensions_sub with NULL as node. Testcase attached; to use on this SVG: http://websvn.kde.org/*checkout*/trunk/KDE/kdegames/libkdegames/carddecks/svg-oxygen/oxygen.svgz Using NULL as node: $ ./test oxygen.svgz RSVG width=2105 height=1488 Node <root> width=2105 heigh=1488 at x=0 y=0 but when using non-NULL node: $ ./test oxygen.svgz '#back' RSVG width=2105 height=1488 Node #back width=13035 heigh=18422 at x=177 y=925
Created attachment 124679 [details] testcase
Created attachment 130082 [details] [review] patch This seems to bring the values to about what one'd expect (not sure it's *completely* correct though).
*** Bug 612560 has been marked as a duplicate of this bug. ***
Created attachment 157960 [details] [review] Fix Many bugs related to no width and height specification come from this... I should have tried to fix this bug first. In case of sub element dimensions handling, the dimensions have already been calculated in rsvg_node_draw so _rsvg_css_hand_normalize_length_sub is unnecessary.
Pushed. http://git.gnome.org/browse/librsvg/commit/?id=067437540fd55f2899a2b13c81a6cad509dd727d