Hi Hardc03r,

hardc0d3r <[EMAIL PROTECTED]> wrote on 07/22/2008 07:42:16 AM:

> i think that is not the problem because the overlay and interactor is
> patterned from the zoom interactor..

   Well the zoom interactor uses xor mode to draw it's indicator
so it can easily clean up it's 'path' by simply drawing it again
with xor, so as you may have noticed it doesn't tell the canvas
to repaint at all.

> i have read somewhere that canvas.immediateRepaint() can also be used 
even
> with complex svg.. what do you mean by complex? large svg? 

   Well, the canvas already 'buffers' the image so calling
immediateRepaint doesn't require rasterizing the document from 
scratch again (in most cases).  So even if the canvas is complex
it shouldn't take much time.  Additionally it should be safe
to call from threads other than the Swing thread (if it is not
in the swing thread when called it will post a runnable to the
swing thread and wait for it to complete).

   The one drawback to immediateRepaint is that there is no
version that takes a Rect so that a smaller portion of the
canvas can be repainted (for a very large canvas and small
changes, in terms of area, this could be significant).

> is it ideal to use for svg editors?

   For most SVG Editing the canvas will take care of
everything for you.  You only need to worry about repainting
stuff manually when stuff you are drawing outside of the
SVG tree changes (i.e. overlays), but this is just like any
other Swing component.

> thomas.deweese wrote:
> > 
> > Hi Hardc0d3r,
> > 
> > hardc0d3r <[EMAIL PROTECTED]> wrote on 07/21/2008 03:54:58 AM:
> > 
> >> how do i prevent the flickering? how do i do double buffering from an
> >> overlay?
> > 
> >    Do you have the Swing double buffering turned off for some
> > reason?
> > 
> >    If you do then you should turn it back on: 
> >         canvas.setDoubleBuffered(true);
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/getting-the-
> element-in-svg-from-an-overlay-tp18301441p18587219.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to