From eb727862e3e8bc96a3b51565b440abed532c3d1e Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 6 Jan 2011 00:37:23 +0100 Subject: [PATCH] graphics: draw(Ver|Hor)Line --- lib/impure/graphics.nim | 4 ++-- 1 file 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) =