Ejemplo n.º 1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            gr = panel2.CreateGraphics();
            br = (Brush)Brushes.Green;
            pn = new Pen(Color.Green);

            //pn.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;

            IPoint a = new Point();
            IPoint b = new Point();

            a.setX(100);
            a.setY(100);
            b.setX(200);
            b.setY(200);

            ICurve line = new Line(a, b);

            lines.Add(line);

            Visual.VisualCurve curve      = new Visual.VisualCurve(line);
            Visual.AFormDrawer contDrawer = new Visual.ContinuousDrawer(br, gr, pn);

            curve.Draw(contDrawer);
        }
Ejemplo n.º 2
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            gr = panel1.CreateGraphics();
            br = (Brush)Brushes.Black;
            pn = new Pen(Color.Black);

            pn.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;

            IPoint a = new Point();
            IPoint b = new Point();

            a.setX(100);
            a.setY(100);
            b.setX(200);
            b.setY(200);

            ICurve line = new Line(a, b);

            lines.Add(line);

            Visual.VisualCurve curve        = new Visual.VisualCurve(line);
            Visual.AFormDrawer dottetDrawer = new Visual.DottedDrawer(br, gr, pn);

            curve.Draw(dottetDrawer);
        }