Hi Javid,

"Javid Alimohideen" <[EMAIL PROTECTED]> wrote on 03/04/2006 06:35:10 PM:

> I was looking through the JSVGCanvas, JSVGComponent source and I figured
> it's complicated for me to understand. All I want to able to do is 
Offscreen
> rendering and manipulate the document. Can someone suggest the batik 
classes
> that I should look into to accomplish my requirements. The 
Imagetranscoder
> is a good solution and I have been using it for a while, but the problem
> with that is everytime I called the transcode method it builds up a new 
tree
> and I would like to avoid it as the document is going to be the same 
except
> it's dynamic.

   Much of the complexity comes from the need to manage when repaints
should occur in a dynamic context, avoiding locking up the swing thread,
and managing 'dirty regions'.

   If you don't want any of these you could just get a graphics from
any old BufferedImage and call 'paint' on the root of the GVT tree.
If you want to try and manage dirty regions (not trivial) you can
try adding the 'updateTracker' to the mix (possibly with the 
DynamicRenderer) but this makes things quite a bit more complex really.

   I think your earlier code is pretty close to working.  I would
encourage you to produce a 'stand alone' version that could be
posted to the list.  Once it is working it could be added to the
Wiki.

> 
> Thanks for any help,
> Javid
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 04, 2006 7:36 AM
> To: [email protected]
> Cc: batik
> Subject: Re: Batik offscreen rendering howto?
> 
> 
> Hi Javid,
> 
> "Javid Alimohideen" <[EMAIL PROTECTED]> wrote on 03/03/2006 08:28:03 
PM:
> 
> > I have a dynamic renderer in my application to render the svg content
> > (offscreen). The rendering works fine but if I make some changes to 
the
> > document the renderer.repaint method doesn't reflect the changes made 
to
> the
> > dom.
> 
>     It sounds like you didn't build the Rendering trying with the
> Bridge set to DYNAMIC.  In this case it won't register listeners
> with the Dom tree to keep the GVT tree in sync with the DOM.
> 
>     Also the dynamic renderer alone is not sufficient to handle
> the 'updates' you need to give it the 'dirty' regions.  Which
> is part of what the UpdateManager normally does for you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to