diff options
author | Araq <rumpf_a@web.de> | 2011-01-06 00:37:23 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-01-06 00:37:23 +0100 |
commit | eb727862e3e8bc96a3b51565b440abed532c3d1e (patch) | |
tree | 130fc0d4eb6bd04d0b1e9daa31520f9fc6d185e9 | |
parent | 8f41312ca685faa91a950bfce866301631d0e2a9 (diff) | |
download | Nim-eb727862e3e8bc96a3b51565b440abed532c3d1e.tar.gz |
graphics: draw(Ver|Hor)Line
-rwxr-xr-x | lib/impure/graphics.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/impure/graphics.nim b/lib/impure/graphics.nim index 2c9f2f49a..b6e2c0677 100755 --- a/lib/impure/graphics.nim +++ b/lib/impure/graphics.nim @@ -264,7 +264,7 @@ proc drawHorLine*(sur: PSurface, x, y, w: Natural, Color: TColor) = var pitch = sur.s.pitch div ColSize if y >= 0 and y <= sur.s.h: - for i in 0 .. min(sur.s.w-x, w-1)-1: + for i in 0 .. min(sur.s.w-x, w)-1: setPix(video, pitch, x + i, y, color) proc drawVerLine*(sur: PSurface, x, y, h: Natural, Color: TColor) = @@ -273,7 +273,7 @@ proc drawVerLine*(sur: PSurface, x, y, h: Natural, Color: TColor) = var pitch = sur.s.pitch div ColSize if x >= 0 and x <= sur.s.w: - for i in 0 .. min(sur.s.h-y, h-1)-1: + for i in 0 .. min(sur.s.h-y, h)-1: setPix(video, pitch, x, y + i, color) proc fillCircle*(s: PSurface, p: TPoint, r: Natural, color: TColor) = |