I suspect I'm kind of missing your point, perhaps you can be
clearer in what you are looking for from SVGGraphics2D?
Peter B. West wrote:
Could you clarify something for me please. As I understood it, the
Java2D stuff assumes a normalized unit of measurement of 1pt = 1/72
inch. It provides float and double versions of the graphical objects,
like Rectangle2D.Double and Rectangle2D.Float. The GraphicsDevice
objects within the GraphicsEnvironment then transform measurements in
the normalized form into device units. It is this normalization that
allows for the predictable representation of of graphics objects on
different output media.
So far, so good?
Actually I don't think this is entirely accurate. The Graphics2D
when you get it is set such that 1 unit ~= 1/72 inch (for displays
it is set to 1 pixel which may be 1/96th inch). If you ask the
Graphics2D for it's transform, you get the transform from the current
'user space' to device space. For screen devices this is usually 1:1,
for print devices this is usually ~1:4. Applications that know what
they are doing take care to rasterize content at the device resolution
not at userspace resolution.
Was it your intention that the SVGGraphics2d environment provide such
functionality? Is this still the case?
I think that SVGGraphics2D conforms to this basic idea[*]. It has
the deficiency that you can't specify an initial 72dpi->device
transform, which is useful for when content gets rasterized. This is
essentially the same issue as the PDF graphics has for raster content.
[*] One unit in the SVG Graphics2D maps to one unit in the root SVG
element's user space, which unless someone adds a viewBox should
map roughly to either 1 screen pixel or 1/72nd of an inch on a