How to Drag and Resize Polygon in Draw2d of Eclipse org.eclipse.draw2d.Polygon

893 views Asked by At

I am working on Polygon Dragging , also Resizing of Polygon. I can draw rectangle using org.eclipse.draw2d.RectangleFigure and I am able to Drag it, I added MouseMotionListener and MouseListener to org.eclipse.draw2d.RectangleFigure.

but

while trying same thing for Polygon. it does not work. mouseDragged event gets called when i try to drag the polygon, but it does not move.

1

There are 1 answers

3
Frettman On BEST ANSWER

If you use a org.eclipse.draw2d.PolygonShape instead of a org.eclipse.draw2d.Polygon it should work as you expect it to.