xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Export jpeg/tif/png saves only visible area of the image
Date Wed, 10 May 2006 10:02:38 GMT
Hi Sudhakar,

Sudhakar S <yessudhakar@hotmail.com> wrote on 05/10/2006 12:56:02 AM:

> After zoomed the SVG document to larger size, if i tried to export it to
> jpeg/tif/png, it saves the area which is available in visible rectangle. 

> Because the getOffScreen returns only the visible portion of the image. 
So
> is it possible to save entire document beyond the visible rectangle too 
with
> scaled size??

    It is possible but requires a bit more work. You will either
need to clone the current document and give the clone to the 
Transcoder with an appropriate width/height (you can calculate 
the size based on the renderingTransform and the size of the 
document). 

    The other alternative would be to construct a BufferedImage of the
proper size (same as above) and pass the Graphics2D from that Image to
the 'paint' method of the root of the GVT tree, you will need to
set the transform on the Graphics based on the rendering transform of the
Canvas.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message