3 ms·
Oh, I didn't catch that, thanks! Maybe add "drag" markers, if you don't already have them?
by StavrosK 6y ago
Oh, I didn't catch that, thanks! Maybe add "drag" markers, if you don't already have them?
- andywang0607 6y agoThere is already exist a mechanism for handling mouse press event. When mouse press on the picture, it will determine whether any polygon is pointed first. If pointed any point of polygon, it will modify the polygon. If no point of polygon is pointed, it will determine whether corner or edge of rectangle is pointed and modify it. If there is no polygon, edge or corner of rectangle pointed, but pointed inside the rectangle, it will move the rectangle. Otherwise, it will create a new rectangle