Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void DrawGrid()
- {
- // Draw grid lines
- for (int i = -400 / (int)this.CanvasScale; i < 400 / (int)this.CanvasScale; i++)
- {
- // x line
- this.DrawLine(new Point(this.Canvas.ActualWidth * -1, i), new Point(this.Canvas.ActualWidth, i), DefaultBrush, NormalThickness);
- // y line
- this.DrawLine(new Point(i, this.Canvas.ActualHeight * -1), new Point(i, this.Canvas.ActualHeight), DefaultBrush, NormalThickness);
- }
- // Draw two main lines
- // x line
- this.DrawLine(new Point(this.Canvas.ActualWidth * -1, 0), new Point(this.Canvas.ActualWidth, 0), AttentionBrush, NormalThickness);
- // y line
- this.DrawLine(new Point(0, this.Canvas.ActualHeight * -1), new Point(0, this.Canvas.ActualHeight), AttentionBrush, NormalThickness);
- }
Add Comment
Please, Sign In to add comment