opensubscriber
   Find in this group all groups
 
Unknown more information…

b : batik-users@xmlgraphics.apache.org 24 August 2009 • 1:20AM -0400

Element Resize Problem
by Heidrun Beer

REPLY TO AUTHOR
 
REPLY TO GROUP








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@xmlg...
For additional commands, e-mail: batik-users-help@xmlg...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.