Oliviers-OSS / mscgen

Automatically exported from code.google.com/p/mscgen
GNU General Public License v2.0
0 stars 0 forks source link

Add width and height attribute to SVG output #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of mscgen are you using? On what operating system?

0.19 on Windows

What enhancement would you like?

Adding width and height attribute to the SVG element. Currently only the 
viewBox attribute is supported.

Reason: SVG renderers like Apache FOP and Apache Batik use the width and height 
attribute to calculate the natural height of the image. Without those attribute 
the natural height and width is unknown and the image is displayed distorted 
and at wrong size.

Once the SVG element is changed from:

<svg version="1.1" 
 viewBox="0 0 600 162"
 xmlns=...

to:

<svg version="1.1"
 width="600"
 height="162"
 viewBox="0 0 600 162"
 xmlns=...

Apache FOP and Apache Batik render the SVG correctlty at its natural size.

Original issue reported on code.google.com by hwmaier@gmail.com on 8 Feb 2011 at 6:23

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r176.

Original comment by Michael....@gmail.com on 9 Feb 2011 at 8:48

GoogleCodeExporter commented 9 years ago
Thanks for pointing this out - it's fixed in the SVN version now.

I checked the test SVGs in firefox, gimp, gthumb and Eye of Gnome and they 
looked good in all of them.  But I don't have FOP or Batik, so if there is 
still a problem there, please get back to me.

Thanks for the report!

Original comment by Michael....@gmail.com on 9 Feb 2011 at 8:52

GoogleCodeExporter commented 9 years ago
Hello,

Thank you for following this up so quickly.

Unfortunately I don't have the Windows build environment set-up so I can 
build from SVN in order to test it. As soon as the Windows binary is 
published I will test and report back.

Please note, mscgen is used in this project:

  http://code.google.com/p/asciidoc-mscgen-filter/

That's how I came across the height/width issue.

Original comment by hwmaier@gmail.com on 10 Feb 2011 at 12:19