Hi Gang,

"Gang Su" <[EMAIL PROTECTED]> wrote on 06/13/2007 03:51:36 PM:

> I am new to Batik and found it a great package for SVG.
> I have a question. Is it possible for me to use Batik to render 
> portion of a huge SVG?

   Yes.

> For example, I can define a huge SVG (1,000,000 * 1,000,000), and 
> want to render 100*100 tiles progressively.
> Is it possible?

   Yes, you can do this.  The simplest way would be to use
the SVG Transcoders with an aoi for each 100x100 block.
However, this will rebuild the graphics tree for each 100x100
block, so it may be very slow.

   So a faster way would be to create the Graphics tree once
and repeatedly call 'paint' on the root graphics node.
I would construct a 100x100 BufferedImage, get a Graphics2D
from it and just translate the Graphics2D for each block.

   There is example code for building the Graphics tree on
the Wiki.  You may also find it useful to look at the code
for the Image transcoders (batik.transcoder.image) to understand
how to save the BufferedImage when you are done.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to