bugfix: macro evaluation; added colors.extractRGB

This commit is contained in:
Andreas Rumpf 2010-03-04 23:42:19 +01:00
commit f45a2f23b0
8 changed files with 190 additions and 154 deletions

View file

@ -150,7 +150,7 @@ proc drawLine*(sur: PSurface, p1, p2: TPoint, color: TColor) =
setPix(video, pitch, x0, y0, color)
proc drawHorLine*(sur: PSurface, x, y, w: Natural, Color: TColor) =
## draws a horizontal line from (x,y) to (x+w-1, h).
## draws a horizontal line from (x,y) to (x+w-1, y).
var video = cast[PPixels](sur.s.pixels)
var pitch = sur.s.pitch div ColSize
for i in 0 .. w-1: setPix(video, pitch, x + i, y, color)