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 philip zuniga <ph...@gmail.com> on 2006/05/28 19:22:13 UTC
SVG rectangle flickers when being dragged
Hello,
I have several SVG rectangles loaded in my batik canvas. What I want in my
application is that I should be able to drag the rectangles horizontally
across the canvas. Hence, I always keep the y attribute of my rectangle
constant. What I constantly change is the x attribute of the rectangle,
(ofcourse it depends on the x coordinate of the mouse pointer), but when I
drag the rectangle, it flickers, also the other rectangles that are near the
dragged rectangle also flickers.
Would you know what my problem is? Is this common when dragging SVG elements
in a canvas?
Re: SVG rectangle flickers when being dragged
Posted by Tonny Kohar <to...@kiyut.com>.
Hi,
On Mon, 2006-05-29 at 01:22 +0800, philip zuniga wrote:
> Hello,
>
> I have several SVG rectangles loaded in my batik canvas. What I want
> in my application is that I should be able to drag the rectangles
> horizontally across the canvas. Hence, I always keep the y attribute
> of my rectangle constant. What I constantly change is the x attribute
> of the rectangle, (ofcourse it depends on the x coordinate of the
> mouse pointer), but when I drag the rectangle, it flickers, also the
> other rectangles that are near the dragged rectangle also flickers.
>
> Would you know what my problem is? Is this common when dragging SVG
> elements in a canvas?
The flicker is depending on the SVG Content and computer speed, because
heavy changing in svg attribute cause a lot of redrawing which might be
the cause for flicker.
If you want to have smoother rectangle drag, you might need to use
double buffering technique.
Regards
Tonny Kohar
--
Sketsa
SVG Graphics Editor
http://www.kiyut.com
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org