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 Hans <ha...@webspeed.dk> on 2006/09/24 12:56:22 UTC
Synchronized resize
Hi
I have a JSVGCanvas with an SVG document in it.
When I try to do a setBounds(x,y,widht,height) to this component - in order
to change its position inside its parent component - it is as if the
operation happens in two steps:
- move the location (x,y)
- resize the SVG document (width,height)
The first very fast - the second slower.
That looks a bit weird.
Is there a way to "synchronize" setBounds with the painting, so that I avoid
the intermediate "wrong" image?
Best regards
Hans
--
View this message in context: http://www.nabble.com/Synchronized-resize-tf2326014.html#a6471108
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Synchronized resize
Posted by th...@kodak.com.
Hi Hans,
Hans <ha...@webspeed.dk> wrote on 09/24/2006 06:56:22 AM:
> I have a JSVGCanvas with an SVG document in it.
> When I try to do a setBounds(x,y,widht,height) to this component - in
order
> to change its position inside its parent component - it is as if the
> operation happens in two steps:
> - move the location (x,y)
> - resize the SVG document (width,height)
> The first very fast - the second slower.
> That looks a bit weird.
>
> Is there a way to "synchronize" setBounds with the painting, so that I
avoid
> the intermediate "wrong" image?
It is possible/likely that setting the JSVGCanvas to
'singleBuffer' mode will accomplish this (even if you do it
just for the resize):
canvas.setDoubleBufferedRendering(false);
Otherwise you might try subclassing the canvas and then
set 'image' to null when the component is resized.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org