Hi Julapy,

julapy <[EMAIL PROTECTED]> wrote on 05/12/2008 12:47:03 AM:

> I'm currently writing some graphic information to a SVGGraphics2D object 
and
> streaming the SVG data into a SVG file.  Life is good.
> 
> I'm now trying to tile the SVGGraphics2D data into smaller SVG files 
since
> the my current output is something rediculous like 60megs and keeps 
crashing
> Illustrator.

> I've looked into using transcoders but only the ImageTranscoder seems to
> support tiling.
> The SVGTranscoder seems like it can do what I'm after but there is no 
way of
> setting the width and height through TranscodingHint like in the
> JPEGTranscoder,
> trans.addTranscodingHint(JPEGTranscoder.KEY_HEIGHT, new 
Float(aoi.height));

   The SVGTranscoder doesn't do anything really, it's really just a 
reformatter, so it doesn't even know where objects are on the canvas.

> Can a transcoder be used for tiling svg files or do I have to take a
> different approach?

   I think you will need to take a different approach.  Ignoring calls
to draw objects that are outside of the clip box is fairly simple. 
It might be nice to add that as an option to the SVGGraphics2D but as a
general tool I think it's good that the SVGGraphics2D keep everything
drawn.

   If you only draw a few basic types you might be able to fairly
easily, either subclass or hack the SVGGraphics2D class to leave 
objects outside of the clip box out of the output SVG.

Reply via email to