예제 #1
0
        public MainForm()
        {
            InitializeComponent();
            ManagerDraw = new ManagerDraw(pbCanvas, pbLineColor, pbCutterColor, pbCuttedLine);
            Cutter      = new Cutter();

            ManagerDraw.Cutter.Points.Add(new Point(200, 400));
            ManagerDraw.Cutter.Points.Add(new Point(200, 100));
            ManagerDraw.Cutter.Points.Add(new Point(400, 400));
            ManagerDraw.DrawCutter();

            /*var l = new Line();
             * l.Pen = ManagerDraw.PenLine;
             * l.A = new Point(500, 400);
             * l.B = l.A;//new Point(300, 100);
             * ManagerDraw.Lines.Add(l);
             *
             * l = new Line();
             * l.Pen = ManagerDraw.PenLine;
             * l.A = new Point(300, 400);
             * l.B = l.A;//new Point(100, 100);
             * ManagerDraw.Lines.Add(l);
             *
             * ManagerDraw.DrawLines();*/
        }
예제 #2
0
        public MainForm()
        {
            InitializeComponent();
            ManagerDraw = new ManagerDraw(pbCanvas, pbLineColor, pbCutterColor, pbCuttedLine);
            Cutter      = new Cutter();

            ManagerDraw.Cutter.Points.Add(new Point(100, 200));
            ManagerDraw.Cutter.Points.Add(new Point(100, 400));
            ManagerDraw.Cutter.Points.Add(new Point(600, 400));
            ManagerDraw.Cutter.Points.Add(new Point(600, 200));
            ManagerDraw.DrawCutter();

            ManagerDraw.Polygon.Points.Add(new Point(86, 122));
            ManagerDraw.Polygon.Points.Add(new Point(13, 250));
            ManagerDraw.Polygon.Points.Add(new Point(144, 152));

            /*ManagerDraw.Polygon.Points.Add(new Point(258, 278));
            *  ManagerDraw.Polygon.Points.Add(new Point(193, 116));
            *  ManagerDraw.Polygon.Points.Add(new Point(284, 66));
            *  ManagerDraw.Polygon.Points.Add(new Point(620, 87));
            *  ManagerDraw.Polygon.Points.Add(new Point(730, 258));
            *  ManagerDraw.Polygon.Points.Add(new Point(600, 237));
            *  ManagerDraw.Polygon.Points.Add(new Point(599, 201));
            *  ManagerDraw.Polygon.Points.Add(new Point(340, 201));
            *  ManagerDraw.Polygon.Points.Add(new Point(288, 136));*/
            ManagerDraw.DrawPolygon();
        }
예제 #3
0
 public void InputCutter(Point cur)
 {
     if (!IsInputCutter)
     {
         ClearCanvas();
         DrawLines();
         Cutter        = new Rectangle(PenCutter, cur, cur);
         IsInputCutter = true;
     }
     else
     {
         Cutter.B = cur;
         Cutter.Draw(g);
         IsInputCutter = false;
     }
 }
예제 #4
0
 public void DrawMovingCutter(Point cur)
 {
     PbCanvas.Refresh();
     Cutter.B = cur;
     Cutter.Draw(gMove);
 }