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 Heidrun Beer <hB...@sgmt.at> on 2009/08/23 19:20:02 UTC

Element Resize Problem

	



Sorry if this question has been asked before - I am new to Batik
and to this mailing list.

I have to write a simple graphics editor in a Java applet. 
It has the usual selection rectangle and 8 anchor rectangles around
the selected element that is to be moved or resized.

The selection rectangle and 8 anchor rectangles are drawn in 
an addition to the outer canvas' paint procedure. The SVG document
is hosted by a child canvas.

All works fine as long as I am dragging. The original element
remains in its original position and size, and a fine blue
rectangle indicates the final position of the intended change.
All is fine up to this point.

At mouse release, I stop dragging and set the new coordinates
for the selected element in the canvas' document. The element 
is rendered OK and the document is updated correctly (if I send
it into a file, the changes are reflected), but if my element 
has become smaller, my selection rectangle and the anchors 
disappear on the sides that have become smaller.

I conclude that after the canvas' repaint the element invalidates
its old rectangle and fills it with the background behind it,
not realizing that I have painted on top of the whole surface. 
I need to do a final repaint after the element has been rendered, 
but when and where? Is there a "rendering complete" event for 
an individual element like the GVT tree renderer event? I have 
tried to invalidate the sub-canvas with the SVG document, 
but that didn't help.



I would be very grateful for your comments!



Best,
Heidrun Beer



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Element Resize Problem

Posted by Heidrun Beer <hB...@sgmt.at>.
Hi Helder,


many thanks, I'll go and wade through it :-)


Best,
Heidrun Beer


On Sun, 23 Aug 2009 19:34:04 +0100, Helder Magalhães wrote in
<2a...@mail.gmail.com>:

>Hi Heidrun,
>
>
>> Sorry if this question has been asked before - I am new to Batik
>> and to this mailing list.
>
>I believe it did, a few times [1] (see section 3.2 and following). ;-)
>
>You may want to check out the available on-line documentation (Wiki
>included), as well as crawl through the users mailing list [2] (I
>personally prefer the Nabble interface [3] for searches).
>
>
>> its old rectangle and fills it with the background behind it,
>> not realizing that I have painted on top of the whole surface.
>> I need to do a final repaint after the element has been rendered,
>> but when and where? Is there a "rendering complete" event for
>> an individual element like the GVT tree renderer event? I have
>> tried to invalidate the sub-canvas with the SVG document,
>> but that didn't help.
>
>Are you using the recommended procedure for document manipulation
>using Java [4]? If so, please provide a test case and more relevant
>information such as Batik version (or SVN revision/nightly build date
>if you are working with the trunk source code), Java and operating
>system environment versions, etc.
>
>
>> I would be very grateful for your comments!
>
>Hope this helps,
> Helder
>
>
>[1] http://xmlgraphics.apache.org/batik/faq.html#display-does-not-update
>[2] http://xmlgraphics.apache.org/batik/mailing-lists.html#batik-users
>[3] http://www.nabble.com/Batik---Users-f351.html
>[4] http://xmlgraphics.apache.org/batik/using/scripting/java.html
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Element Resize Problem

Posted by Helder Magalhães <he...@gmail.com>.
Hi Heidrun,


> Sorry if this question has been asked before - I am new to Batik
> and to this mailing list.

I believe it did, a few times [1] (see section 3.2 and following). ;-)

You may want to check out the available on-line documentation (Wiki
included), as well as crawl through the users mailing list [2] (I
personally prefer the Nabble interface [3] for searches).


> its old rectangle and fills it with the background behind it,
> not realizing that I have painted on top of the whole surface.
> I need to do a final repaint after the element has been rendered,
> but when and where? Is there a "rendering complete" event for
> an individual element like the GVT tree renderer event? I have
> tried to invalidate the sub-canvas with the SVG document,
> but that didn't help.

Are you using the recommended procedure for document manipulation
using Java [4]? If so, please provide a test case and more relevant
information such as Batik version (or SVN revision/nightly build date
if you are working with the trunk source code), Java and operating
system environment versions, etc.


> I would be very grateful for your comments!

Hope this helps,
 Helder


[1] http://xmlgraphics.apache.org/batik/faq.html#display-does-not-update
[2] http://xmlgraphics.apache.org/batik/mailing-lists.html#batik-users
[3] http://www.nabble.com/Batik---Users-f351.html
[4] http://xmlgraphics.apache.org/batik/using/scripting/java.html

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org