Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            cutter    = new Cutter();
            lines     = new List <Segment>();
            last_line = new List <PointF>();

            saved_picture    = new Bitmap(canvasBase.Width, canvasBase.Height);
            g                = Graphics.FromImage(saved_picture);
            g_move           = canvasBase.CreateGraphics();
            canvasBase.Image = saved_picture;

            pen_cutter                = new Pen(Color.Black, 1);
            pen_lines                 = new Pen(Color.Red, 1);
            pen_highlight             = new Pen(Color.Blue, 1);
            pictureBoxColor.BackColor = Color.Blue;

            radioButtonCutter.Checked = true;

            /*cutter.AddVertex(1, 0);
             * cutter.AddVertex(0, 1);
             * cutter.AddVertex(0, 2);
             * cutter.AddVertex(1, 3);
             * cutter.AddVertex(2, 3);
             * cutter.AddVertex(3, 2);
             * cutter.AddVertex(3, 1);
             * cutter.AddVertex(2, 0);
             *
             * cutter.CutCyrusBeck(new Segment(new PointF(-1, 1), new PointF(3, 3)));*/
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            Canvas = pictureBox1.CreateGraphics();

            CurrentCutter = new Cutter();

            ButtonSegmentDraw.Enabled = false;
        }