Пример #1
0
 public Scene()
 {
     shapes = new List<Shape>();
     CurrentColor = Color.Red;
     selectedShape = null;
 }
Пример #2
0
 // On mouse up
 public void ClearSelected()
 {
     selectedShape.Selected = false;
     selectedShape = null;
 }
Пример #3
0
 // On mouse down
 public void Select(Point position)
 {
     foreach (Shape shape in shapes)
     {
         if (shape.Clicked(position))
         {
             selectedShape = shape;
             selectedShape.Selected = true;
         }
     }
     previousPoint = position;
 }