The moose likes Game Development and the fly likes Picking 2D Graphics from Canvas Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Game Development
Reply Bookmark "Picking 2D Graphics from Canvas" Watch "Picking 2D Graphics from Canvas" New topic
Author

Picking 2D Graphics from Canvas

Mike Cole
Ranch Hand

Joined: Sep 25, 2006
Posts: 38
Hi all,

i have a question. Ive made an isometric drawing "engine" and with the mouse you can "select" these iso fields. But now i need something more complicated:
I want to pick graphics directly, the problem is that: Imagine a table. On the table is a plate, with an apple on it. If you hover with your mouse-cursor over the apple the grid selection is actually behind the table, so you will never be able to pick it up. It looks wrong.

Does someone have an idea how i could find out which image the mouse is over?
All the images are objects. So clicking on the apple should sooner or later return the object.

Thank you!
 
 
subject: Picking 2D Graphics from Canvas
 
Threads others viewed
(Not so) Mighty Mouse
display mouse pointer coordinates
Generics <?>
Drawing in XORMode or Layers?
Non-technical interview questions
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com