let .net do the rounding

This commit is contained in:
Lars Brubaker 2016-05-11 12:26:20 -07:00
parent 7f1255ace1
commit 5614563530
7 changed files with 16 additions and 16 deletions

View file

@ -439,8 +439,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
Vector2 end = new Vector2(gridSizeMm.x, y) + gridOffset;
transform.transform(ref start);
transform.transform(ref end);
grid.MoveTo((int)(start.x + .5), (int)(start.y + .5) + .5);
grid.LineTo((int)(int)(end.x + .5), (int)(end.y + .5) + .5);
grid.MoveTo(Math.Round(start.x), Math.Round(start.y));
grid.LineTo(Math.Round(end.x), Math.Round(end.y));
}
for (int x = 0; x <= gridSizeMm.x; x += 10)