Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            IPoint a = new Point();

            a.setX(300);
            a.setY(100);

            IPoint b = new Point();

            b.setX(250);
            b.setY(250);

            IPoint c = new Point();

            c.setX(100);
            c.setY(150);

            IPoint d = new Point();

            d.setX(150);
            d.setY(150);

            ICurve curve = new Bezier(a, b, c, d);

            Visual.VisualCurve visualCurve = new Visual.VisualCurve(curve);
            visualCurve.Draw(this);
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            IPoint a = new Point();
            IPoint b = new Point();

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

            ICurve curve = new Line(a, b);

            Visual.Intermittent decorator = new Visual.Intermittent(this);

            Visual.VisualCurve visualCurve = new Visual.VisualCurve(curve);
            visualCurve.Draw(decorator);
        }