Bug 43744 - Distortion in ellipse rendering
Distortion in ellipse rendering
Status: RESOLVED INVALID
Product: Batik - Now in Jira
Classification: Unclassified
Component: SVG Rasterizer
1.7
Other other
: P2 normal
: ---
Assigned To: Batik Developer's Mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-10-31 03:48 UTC by Andrea Aime
Modified: 2007-11-01 02:45 UTC (History)
0 users



Attachments
The sample SVG file (created by InkScape) (1.55 KB, image/svg+xml)
2007-10-31 03:48 UTC, Andrea Aime
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Aime 2007-10-31 03:48:19 UTC
The attached svg file does not seem to get properly rendered by Batik.
The file is purely geometric, no fancy scripting included, and has been
generated with InkScape.
Basically, the external circle seems to be rendered more like an "egg" or a
flattened elllipse by Batik, whilst InkScape and Firefox 2 both render it
properly (e.g. it looks like a circle all right).
Comment 1 Andrea Aime 2007-10-31 03:48:57 UTC
Created attachment 21064 [details]
The sample SVG file (created by InkScape)
Comment 2 Andrea Aime 2007-10-31 03:54:50 UTC
Oh btw, the rendering tests I have done involved both the direct usage of the
Batik API (in GeoTools, a GIS library that uses Batik to render svg icons on
maps) and by  using Squiggle, both with version 1.6 and 1.7
Comment 3 Cameron McCormack 2007-10-31 17:44:31 UTC
Hi Andrea.

Small shapes sometimes do look 1px different with the default rendering hints 
that to the Java2D renderer.  Putting a shape-rendering="geometricPrecision" 
attribute on the <svg> element will correct it in this case.  See:

  http://www.w3.org/TR/SVG11/painting.html#ShapeRenderingProperty
Comment 4 Andrea Aime 2007-11-01 00:46:36 UTC
Interesting... is there any way to force that attribute programmaticaly while
playing with the transcoder? 
Comment 5 Cameron McCormack 2007-11-01 02:45:05 UTC
Yes just modify the SVG document beforehand to include the shape-
rendering="geometricPrecision" attribute before invoking the transcoder.