Listing 3. Draw three parallel lines of pixels.
for(int cnt = 0;cnt < 400;cnt += 3){ putpixel(screen,cnt,400-cnt,makecol(255,0,0));; putpixel(screen,cnt-1,400-cnt-1,makecol(0,255,0)); putpixel(screen,cnt+1,400-cnt+1,makecol(0,0,255)); }//end for loop |