예제 #1
0
        public ManagerDraw(PictureBox pbCanvas, PictureBox pbLineColor, PictureBox pbCutterColor, PictureBox pbCuttedLineColor)
        {
            Canvas         = new Bitmap(pbCanvas.Width, pbCanvas.Height);
            g              = Graphics.FromImage(Canvas);
            gMove          = pbCanvas.CreateGraphics();
            pbCanvas.Image = Canvas;
            PbCanvas       = pbCanvas;

            _penLine       = new UserPen(Color.Black, pbLineColor);
            _penCutter     = new UserPen(Color.Red, pbCutterColor);
            _penCuttedLine = new UserPen(Color.Green, pbCuttedLineColor);

            PbCanvas.MouseClick += PbCanvas_MouseClick;
            IsInputCutter        = false;
            IsInputLine          = false;

            Lines = new List <Line>();
        }
예제 #2
0
        public ManagerDraw(PictureBox pbCanvas, PictureBox pbLineColor, PictureBox pbCutterColor, PictureBox pbCuttedLineColor)
        {
            Canvas         = new Bitmap(pbCanvas.Width, pbCanvas.Height);
            g              = Graphics.FromImage(Canvas);
            gMove          = pbCanvas.CreateGraphics();
            pbCanvas.Image = Canvas;
            PbCanvas       = pbCanvas;

            _penLine       = new UserPen(pbLineColor);
            _penCutter     = new UserPen(pbCutterColor);
            _penCuttedLine = new UserPen(pbCuttedLineColor);

            IsInputCutter  = false;
            IsInputPolygon = false;

            Polygon = new Polygon();
            Cutter  = new Polygon();

            PenLine       = new Pen(Color.Black);
            PenCutter     = new Pen(Color.Red);
            PenCuttedLine = new Pen(Color.Green);
        }