Beispiel #1
0
 //draw shape method
 public void DrawShape(IGraphics graphics)
 {
     DoDrawShape(graphics);
     if (IsSelected)
     {
         graphics.DrawBorder(TopLeftPoint, BottomRightPoint);
     }
 }
Beispiel #2
0
 //draw Shapes
 public void DrawShapes(IGraphics graphics)
 {
     graphics.ClearCanvas();
     foreach (Shape shape in Shapes)
     {
         shape.DrawShape(graphics);
     }
     if (operationShape != null)
     {
         operationShape.DrawShape(graphics);
     }
 }
Beispiel #3
0
 //a virutal function to draw shape
 protected virtual void DoDrawShape(IGraphics graphics)
 {
 }
Beispiel #4
0
 //draw all shapes
 public void DrawShapes(IGraphics graphics)
 {
     PaintModel.DrawShapes(graphics);
 }
Beispiel #5
0
 //rectangle draw
 protected override void DoDrawShape(IGraphics graphics)
 {
     graphics.DrawRectangle(TopLeftPoint, BottomRightPoint);
 }