You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Jonathan Gray <Jo...@agilisys.co.uk> on 2005/02/25 15:14:32 UTC

rasterizing part of an SVG

Hi,

 

I'd like to be able to rasterize parts of an SVG document and then have
those images included in the svg as <image> elements.  I have been able to
succesfully paint a CanvasGraphicsNode by setting the viewTransform
appropriately, however, I want to be able to rasterize the children
individually.

 

Is there a simple way of doing this?  For the example simple tree

 

svg

-          text

-          g

o        polygon

o        polygon

o        polygon

-          g

o        polygon

 

I want to be able to rasterize each of the g (CompositeGraphicsNode)
elements but leave the rest of the svg as it is.  I have tried simply
wrapping the CompositeGraphicsNodes in CanvasGraphicsNode but I'm not sure
that is the right direction.  If it is should I be creating a custom bridge
to do that throughout the document?

 

Jon