Line |
Bitmaps | |
| Aptilis 1 | ||
Line(BitmapHandle, x1, y1, x2, y2, Colour)
Line allows you to draw a line from (including)
(x1, y1) to (including)(x2, y2).
The colour is specified through its index.
Return Value:
0 if everything was OK or -1 if you indicated a non-valid
bitmap.
Example:
b = createBitmap(200, 200)
if b = -1
print("Ooops, could not create the bitmap....\n")
else
// White background
clearBitmap(b, RGB(255, 255, 255))
for i=0 to 200 step 10
// We take random colours...
line(b, 0, i, i, 199, random(256))
line(b, i, 0, 199, i, random(256))
end for
saveGIFFile("lines.gif", b)
end if
Result:
![]() |
For more details see the Bitmap topic.
