Exemplo n.º 1
0
        private void button21_Click(object sender, EventArgs e)
        {
            Bitmap a = new Bitmap(600, 460);

            if (pictureBox1.Image != null)
            {
                a = (Bitmap)pictureBox1.Image.Clone();
            }


            Color[]  Paleta = new Color[16];
            segmento s      = new segmento();

            for (int i = 0; i <= 15; i++)
            {
                Paleta[i] = Color.FromArgb((int)(-11.666666667 * i + 252), (int)(9.733 * i + 53), (int)(4.8 * i + 5));
                s.X0      = -3;
                s.Y0      = -2;

                s.xf   = 7;
                s.yf   = 4;
                s.col0 = Paleta[i];
                s.encender(ref a);
            }



            pictureBox1.Image = a;
        }
Exemplo n.º 2
0
        public void segmento2(double X0, double Y0, double xf, double yf, ref Bitmap bmp, Color color)
        {
            //Bitmap bmp = new Bitmap(640, 480);
            segmento s = new segmento();

            s.X0   = X0;
            s.Y0   = Y0;
            s.xf   = xf;
            s.yf   = yf;
            s.col0 = color;
            s.encender(ref bmp);
            pictureBox1.Image = bmp;
        }
Exemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            Bitmap   bmp = new Bitmap(640, 480);
            segmento s   = new segmento();


            s.X0 = -5;
            s.Y0 = -6;
            s.xf = 10;
            s.yf = -5;

            s.encender(ref bmp);
            pictureBox1.Image = bmp;
        }