You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@kodak.com on 2007/10/04 11:49:45 UTC

Re: Whats the function of setDoubleBufferedRendering in JSVGCanvas

Hi Naveed,

noni_4444 <na...@gmail.com> wrote on 09/13/2007 02:23:48 AM:

> I have an applet within which i am doing some animation. The animation 
is
> flickering no matter whether i set setDoubleBufferedRendering to true or
> false.
> 
> My problem might be something else, but i was just curious about the 
actual
> operation of this function. What does this function call achieve?

   The JSVGCanvas renders the document to an offscreen buffer so that
updates to the screen (for example when a window moves over the
canvas) can be made quickly without having to draw everything from
scratch.

   When double buffer is set to true it maintains two offscreen buffers.
One buffer is used to update the screen the other is used for rendering,
when a rendering completes the two buffers are swapped.  This ensures that
a 'good' offscreen buffer is always available.  Some additional copying
needs to happen to update the 'old' buffer from the new buffer however.