You will need to develop a data structure for storing point data so that it can be easily requested and processed. The Path object may be sufficient for this, but consider moving it to another object to present a more domain-specific interface.
You will need to detect mouse events in Canvas and click the test for all the vertices in the path.
A hit test is a function that gives you a link to one point in the path closest to the mouse coordinate, or null if the click is too far from any point that is considered a βhit.β The result check function becomes a low-level construct from which you can Create more interesting editing operations.
For example, you can save a bool for each waypoint indicating whether a point is selected. When you drag the mouse with the button down, you can drag all the selected points by moving their data in the data structure mentioned earlier.
source share