private void Form1_Load(object sender, EventArgs e) { Desen = this.CreateGraphics(); Creion_negru = new System.Drawing.Pen(System.Drawing.Color.Black); cerc1 = new Cerc(); cerc2 = new Cerc(); cerc3 = new Cerc(); cerc1.Initializare_cerc(70, 100, 120); cerc2.Initializare_cerc(220, 40, 150); cerc3.Initializare_cerc(200, 200, 50); }
private void Form1_Load(object sender, EventArgs e) { Desen = this.CreateGraphics(); Creion_negru = new System.Drawing.Pen(System.Drawing.Color.Black); Pensula_neagra = new System.Drawing.SolidBrush(System.Drawing.Color.Black); cerc1 = new Cerc(); cerc2 = new Cerc(); cerc3 = new Cerc(); cerc1.Initializare_cerc(100, 60, 130); cerc2.Initializare_cerc(300, 100, 100); cerc3.Initializare_cerc(270, 190, 50); }
private void button1_Click(object sender, EventArgs e) { bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height); grp = Graphics.FromImage(bmp); grp.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; int l = r.Next(pictureBox1.Height / 2 - 10); int o1 = r.Next(l, pictureBox1.Width - l); int o2 = r.Next(l, pictureBox1.Height - l); Cerc cerc = new Cerc(l, o1, o2); cerc.DeseneazaCerc(grp, pen); pictureBox1.Image = bmp; }