Beispiel #1
0
 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;
         }
     }
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 public void Add(MyLine line)
 {
     lines.Add(line);
 }