//draw the graphic public void Draw(IGraphics graphics, bool isPressed) { graphics.ClearAll(); foreach (Shape aShape in _shapes) { aShape.Draw(graphics); } if (_shape != null) { _shape.DrawSelected(graphics); } if (isPressed) { if (_mode == LINE) { _line.Draw(graphics); } if (_mode == RECTANGLE) { _rectangle.Draw(graphics); } if (_mode == ELLIPSE) { _ellipse.Draw(graphics); } if (_mode == ARROW) { _arrow.Draw(graphics); } if (_mode == SELECT && _shape != null) { _shape.DrawSelected(graphics); } } }
// public void Save(IGraphics graphics) { graphics.ClearAll(); foreach (Shape eachShape in _shapeList) { eachShape.Fill(graphics); } }
// 將所有 shape 重繪 protected void RefreshShapes(IGraphics graphics) { graphics.ClearAll(); foreach (Shape shape in _shapes) { shape.Draw(graphics); } }
/// <summary> Draw list. </summary> public void DrawList() { _graphics.ClearAll(); foreach (IShape shape in _shapes) { shape.Draw(_graphics); } }
/// <summary> /// Redraw the canvas. /// </summary> public virtual void RefreshDrawCanvas(IGraphics graphics) { if (graphics == null) { throw new ArgumentNullException(Definitions.ERROR_GRAPHICS_IS_NULL); } graphics.ClearAll(); Draw(graphics); }
// public void Draw(IGraphics graphics) { graphics.ClearAll(); foreach (Shape eachShape in _shapeList) { eachShape.Fill(graphics); } if (_isPressed) { _hint.Draw(graphics); } }
//Print all shapes in the shape list and the hint shape public void Draw(IGraphics graphics) { graphics.ClearAll(); foreach (Shape shape in _shapes) { shape.Draw(graphics); } if (_isPointerPressed) { _hintShape.Draw(graphics); } }
public void Draw(IGraphics graphics) { graphics.ClearAll(); foreach (Line line in _lines) { line.Draw(graphics); } if (_isPressed) { _hint.Draw(graphics); } }
//draw all shapes public void Draw(IGraphics graphics) { graphics.ClearAll(); foreach (Shape aShape in _shapes) { aShape.Draw(graphics); } if (_isPressed) { _hintShapes[_paintMode].Draw(graphics); } }
/// <summary> Draws the given graphics. </summary> /// /// <param name="graphics"> The graphics. </param> /// <param name="isRedLine"> (Optional) True if is red line, false if not. </param> public void Draw(IGraphics graphics, bool isRedLine = false) { graphics.ClearAll(); foreach (var shape in _shapes) { shape.Draw(graphics, isRedLine); } if (_isPressed) { _shape.Draw(graphics, isRedLine); } }
// Draw the shape public void Draw(IGraphics graphics) { graphics.ClearAll(); foreach (Shape aShape in _shapes) { aShape.Draw(graphics); } if (_isPressed) { DrawTheShape(graphics); } }
//Draw public void Draw(IGraphics graphics) { graphics.ClearAll(); foreach (Shape aShape in _shapes) { aShape.Draw(graphics); } if (_hint != null) { _hint.Draw(graphics); } if (_selected != null) { _selected.DrawBorder(graphics); } }
// draw circle by interface public void Draw(IGraphics graphics) { graphics.ClearAll(); foreach (Shape aLine in _mouseEventModel.ShapeList) { if (_mouseEventModel.IsSelected != null && _mouseEventModel.ShapeList.IndexOf(aLine) == _mouseEventModel.Selected) { _mouseEventModel.Hint.Draw(graphics); continue; } aLine.Draw(graphics); } if (_mouseEventModel.IsPressed) { _mouseEventModel.Hint.Draw(graphics); } }
// 畫圖 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); } }