Rysowanie elips



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RysowanieElips2
{
    public partial class Form1 : Form
    {
        Graphics g1;
        public Form1()
        {
            InitializeComponent();
            g1 = this.CreateGraphics();

            
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void Button1_Click(object sender, EventArgs e)
        {
           


        }

        private void Button1_Click_1(object sender, EventArgs e)
        {
            Pen p1 = new Pen(Color.Black, 1);
            g1.TranslateTransform(200, 200);
            g1.DrawLine(p1, -100, 0, 100, 0);
            g1.DrawLine(p1, 100, 0, 90, -10);
            g1.DrawLine(p1, 100, 0, 90, 10);
            g1.DrawLine(p1, 0, -100, 0, 100);
            g1.DrawLine(p1, 0, 100, -10, 90);
            g1.DrawLine(p1, 0, 100, 10, 90);
        }

        private void Button2_Click(object sender, EventArgs e)
        {
            Pen p1 = new Pen(Color.Blue, 3);
            Pen p2 = new Pen(Color.Red, 3);
            g1.DrawEllipse(p1, -100, -50, 200, 100);
            g1.DrawEllipse(p2, -50, -100, 100, 200);
        }

        private void Button3_Click(object sender, EventArgs e)
        {
            SolidBrush b1 = new SolidBrush(Color.Aqua);
            g1.FillEllipse(b1, 0, 0, 100, 60);

        }
    }
}