Guest User

Untitled

a guest
Dec 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. public void DrawGrid()
  2. {
  3. // Draw grid lines
  4. for (int i = -400 / (int)this.CanvasScale; i < 400 / (int)this.CanvasScale; i++)
  5. {
  6. // x line
  7. this.DrawLine(new Point(this.Canvas.ActualWidth * -1, i), new Point(this.Canvas.ActualWidth, i), DefaultBrush, NormalThickness);
  8. // y line
  9. this.DrawLine(new Point(i, this.Canvas.ActualHeight * -1), new Point(i, this.Canvas.ActualHeight), DefaultBrush, NormalThickness);
  10. }
  11.  
  12. // Draw two main lines
  13. // x line
  14. this.DrawLine(new Point(this.Canvas.ActualWidth * -1, 0), new Point(this.Canvas.ActualWidth, 0), AttentionBrush, NormalThickness);
  15. // y line
  16. this.DrawLine(new Point(0, this.Canvas.ActualHeight * -1), new Point(0, this.Canvas.ActualHeight), AttentionBrush, NormalThickness);
  17. }
Add Comment
Please, Sign In to add comment