W3C home > Mailing lists > Public > www-svg@w3.org > March 2008

Re: jagged edges

From: Helder Miguel Magalh„es <helder.magalhaes@efacec.pt>
Date: Wed, 12 Mar 2008 10:11:45 -0000
Message-ID: <BA0FD0EA8282D74CAE2088A5DCB4474B05276389@S005.maia.efacec.pt>
To: <www-svg@w3.org>
> No matter where the star appears in my image, it is rough and jagged.

This may be due to several things:
1. Some combination of (somehow incoherent) attributes is confusing Batik.
The path states two opacities: "simple" and "stroke-opacity". Also useless stroke commands: "stroke-linejoin", "stroke-dasharray", "stroke" (color) and a zero "stroke-width" which basically makes the previous useless.

2. Due to an issue in Batik's PDF transcoder.
It's not stated whether the image only seems wrong after exported to PDF or if it has the jagged look in the screen already. To be honest, I've tried to reproduce the jagged look and wasn't able to do it: I've used ASV6, Renesis 0.7, Firefox 2, Safari 3 beta and Batik Squiggle 1.7 and the shape looks great in all implementations.

3. Due to some issue with processing style attributes which are generally recommended [1] as shape formatting attributes.

I've taken the liberty of changing the original shape:
a) Cleaning up the SVG, by removing the unneeded style attributes;
b) Converting all style attributes to shape formatting attributes;
c) Adding the "shape-rendering" attribute [2] to further improve rendering;
d) Combining the "opacity" with the "fill-opacity" (this was done in a quick-and-dirty approach).

> I don't think this is a Batik issue.

Please try with the attached file and share your results. If this fixes your issue, you are invited to make further tests and to share them, possibly in Batik's mailing list [3] if you change you mind about the possible source of the issue.

Hope this helps,

  Helder Magalh„es

[1] http://jwatt.org/svg/authoring/#the-style-attribute
[2] http://www.w3.org/TR/SVG/painting.html#ShapeRenderingProperty
[3] http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/

Received on Wednesday, 12 March 2008 10:13:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:13 UTC