The thing is, the position of the Shape, after its moment of creation seems to 
never change (if you ask the shape i.e. shape.getBoundingBox() )

So you might as well jus tmake all your shapes at ULHC 0,0 and keep some sort f 
funning total about how the graphics object has been transformed with respect 
to each shape. Because if you AT the graphics over here, there anywhere, the 
shape will always report that it lives where ever you created it, no matter 
where it's painted on the screen. If you want it to appear at some point, then 
100 pixels to the left of that later on, then you want to know if the mouse is 
over a particular shape, you have to somehow keep a record of the cumulative 
total of all the AT changes which were applied to the graphics before THAT 
shape was painted and then calculate some transform on the mouse event point 
that takes you back to where the shape thinks its home sweet home is , as and 
always will be, then ask the shape if perhaps it 
shape.contains(mouseEvent.getPoint())

I think I got that right without exaggerating.

Yucky Ducky.

Can this be how Duke meant for things to be?
[Message sent by forum member 'swv' (swv)]

http://forums.java.net/jive/thread.jspa?messageID=227860

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to