After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 475978 - pydia svg export : truncated output (viewBox should be ints)
pydia svg export : truncated output (viewBox should be ints)
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: exports
0.96.1
Other All
: Normal normal
: 0.98
Assigned To: Dia maintainers
Dia maintainers
: 540220 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-09-11 19:23 UTC by philippe
Modified: 2011-01-30 19:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple diagram that shows bug when exported (2.88 KB, application/x-dia-diagram)
2007-09-12 05:55 UTC, Lars Clausen
Details
SVG file exported using SVN head (456 bytes, image/svg+xml)
2007-09-12 05:56 UTC, Lars Clausen
Details

Description philippe 2007-09-11 19:23:57 UTC
Please describe the problem:
When I export a drawing to svg format, it is not well viewed in other SVG tools.
For example Firefox and Sketsa Editor.

It seems that the exported region is truncated or that the bounding box is not well centered.

I expect the output to have identical margins (top,bottom,left and right).

The size of the margins depends on the content.

Steps to reproduce:
1. Draw a box. Export to svg.
2. Draw a 2nd box next to the first one. Export to svg.
3. Draw a 3rd box next to the former ones. Export to svg.

Compare export files.

Actual results:
Depending on boxes positioning, the size of margins when viewed with Firefox or Sketsa are variables whereas position of box is the same in editor.
It looks like the bounding box of the exported portion of diagram is wrong.

Expected results:
I expect the bounding box of the export diagram to be centered.

Does this happen every time?
Yes

Other information:
Comment 1 Lars Clausen 2007-09-12 05:55:09 UTC
Confirmed, attaching example diagram and SVG output that show a BB in Inkscape that has nothing to do with the page layout or anything.
Comment 2 Lars Clausen 2007-09-12 05:55:48 UTC
Created attachment 95402 [details]
Simple diagram that shows bug when exported
Comment 3 Lars Clausen 2007-09-12 05:56:13 UTC
Created attachment 95403 [details]
SVG file exported using SVN head
Comment 4 Hans Breuer 2007-09-12 21:05:34 UTC
Please be aware that there are up to three ways to export SVG, see:
http://mail.gnome.org/archives/dia-list/2007-September/msg00023.html

This bug report reminds me on the main issue in bug #316590, but here diasvg.py is used. The issue is related to the svg::viewBox apparently only allowing int rather than float but I'd like to find if there is a different solution than taken in DiaSvgRenderer.
Comment 5 Hans Breuer 2007-09-22 12:18:41 UTC
more descriptive subject
Comment 6 Hans Breuer 2008-06-27 10:24:57 UTC
*** Bug 540220 has been marked as a duplicate of this bug. ***
Comment 7 Hans Breuer 2011-01-30 19:41:48 UTC
After all it where not the ints but passing in conrners instead of upper left corner, width and height. Finally fixed on master:

http://git.gnome.org/browse/dia/commit/?id=e6397b3b740081a91ebd6f6b6fc717eda8d79d63