예제 #1
0
파일: Model.cs 프로젝트: 106820026/Painter
 // 畫圖
 public void Draw(IGraphics graphics)
 {
     graphics.ClearAll();
     foreach (IShape aShape in _shapes)
     {
         aShape.Draw(graphics);
     }
     if (IsPressed && CurrentMode != -1) // default drawing
     {
         _shapeHint.Draw(graphics);
     }
     if (IsSelected && CurrentMode == -1) // resize & select shape
     {
         _shapeHint.Draw(graphics);
         SelectedShape.DrawFrame(graphics);
     }
 }