Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsintersecting elements
https://www.eclipse.org/forums/index.php/mv/msg/68147/213815/#msg_213815
I am working on an editor representing a diagram. For that purpose I am
using GEF and draw2d.
Now I want to forbid intersection of elements (draw2d.Figures) in the
diagram.
How can I check if two figures are intersecting?
I created a command that inserts a new element on the mouse's position.
I should possibly forbid the insertion of a new intersecting Figure by
working on the canExecute method of the command.
I have the position of the new Figure (bounds) but I have to check if
there is already an element on the clicked location. How can I verify that?
Or is there another way to avoid intersection of elements in GEF?