Example #1
0
 public MixFigure(int x, int y, int width, int height)
 {
     X = x;
     Y = y;
     Width = width;
     Height = height;
     figures = new BaseFigure[2];
     figures[0] = new CircleFigure(m_x + m_width / 2, m_y + m_height /2, Math.Min(m_width, m_height));
     figures[1] = new RectangleFigure(m_x, m_y, m_width, m_height);
 }
Example #2
0
File: Form1.cs Project: pSasa/c-
 private void Form1_Paint(object sender, PaintEventArgs e)
 {
     BaseFigure figure = new CircleFigure(30, 30, 30);
     figure.Draw(e.Graphics);
     figure = new RectangleFigure(30, 30, 30,30);
     figure.Draw(e.Graphics);
     figure = new MixFigure(70, 30, 40, 30);
     figure.Draw(e.Graphics);
     figure = new MixFigure(120, 30, 30, 40);
     figure.Draw(e.Graphics);
 }