public void addVertexOnThePressedLine(Point pressedPoint) { for (int i = 0; i < lines.Count; i++) { if (lines[i].checkPressedLine(pressedPoint)) { MyLine tmp = lines[i]; lines.RemoveAt(i); lines.Insert(i, new MyLine(tmp.start, tmp.midPoint())); lines.Insert(i + 1, new MyLine(tmp.midPoint(), tmp.end)); break; } } }
public Form1() { InitializeComponent(); panel2 = HolderPanel; actualCreatingRectangle = new MyRectangle(); createingLine = false; rectangles = new List <MyRectangle>(); startPointRectangle = Point.Empty; actualCreatingLine = new MyLine(Point.Empty, Point.Empty); SelectedButton = create_polygons_button; leftMouseDown = false; actualEditedRectangle = null; actualMovingPointIndex = -1; startPressedPosForMoveLine = Point.Empty; rectangleWithSelectedEdge = null; pressedLineIndex = -1; activeAlgorythm = system_method_radiobutton; }
public void Add(MyLine line) { lines.Add(line); }