xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Maher <steve.f.ma...@gmail.com>
Subject Rendering quality (subsampling)
Date Wed, 14 Dec 2011 14:01:55 GMT

I'm looking for a high-quality SVG renderer.  Batik's rasterizer seems to
be the best out of the three I've tried, but I need it to do better.  I've
tried all the image-rendering, shape-rendering, color-rendering hints
without much (any?) change.  I've searched the source - mainly to try to
increase any subsampling quantities - but had no luck.

I'm dealing with small circles that need to be rendered "correctly" for a
custom projector in our lab at work.

For example, for a circle of radius .5 pixels (no stroke), and centered in
the middle of a pixel (in other words, a circle touching the edges of a
pixel), the rendered pixel intensity should be roughly PI/4 times the
intensity of the circle (because the ratio of circle area to square area is

Also, if I rotate the circle by 45 degrees (rotation centered on corner of
pixel), there will be a 4 pixel square used to render the circle, with most
intensity split between two adjacent pixels and much less intensity split
between the other two adjacent pixels.

Batik comes close, but the intensity is high in the first case and in the
second case, the intensity is not symmetric between the adjacent pixels
(like the rotation wasn't exactly 45 degrees).

One option I am exploring is to artificially enlarge the scene, render by 1
pixel circle across, oh, 100 pixels, and then shrink the image.
 Effectively increasing the subsampling of the circle to determine pixel
intensity.  I was hoping to be able to do that natively in the Batik source
- or use some other SVG renderer.

Any tips are appreciated -


View raw message