Exemple #1
0
 // EXAMPLE
 public static void DrawTree(int x, int y)
 {
     McRectangle trunk        = new McRectangle(x + 10, y + 20, 20, 60, "brown");
     McCircle    leftLeaves   = new McCircle(x, y + 20, 20, "green");
     McCircle    middleLeaves = new McCircle(x + 20, y + 10, 20, "green");
     McCircle    rightLeaves  = new McCircle(x + 40, y + 20, 20, "green");
 }
Exemple #2
0
 public McDrawing(Control control)
 {
     _control = control;
     _shapes  = new List <IMcShape>();
     // Attach each type of shape to this McDrawing
     McPoint.SetDrawing(this);
     McRectangle.SetDrawing(this);
     McCircle.SetDrawing(this);
 }