3 ms·
There 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 p
by andywang0607 6y ago
There 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