Hi all,
I have a list of points created during design time. when I run my program a shape is created according to the order in which the points have been added. When I then click on the shape , a new point is created according to the position of the mouse relative to the drawing area in my application. My problem is , my list is already in a specific order and I am having trouble figuring out a proper method to work out if the new point is before or after the current point already drawn on the shape.
Here is an illustration of my problem
This is the Shape ive drawn when the app starts:
150,150
270, 150
270, 270
150, 270
150, 150
150,150 o-----------o 270, 150
| |
| |
| |
150, 270 o-----------o 270, 270
And this is what I want to do
150,150
270, 150
270, 270
265 ,270 #inserted here dynamically
150, 270
150, 150
150,150 o-----------o 270, 150
| |
| |
| |
150, 270 o-----o-----o 270, 270
265,270