Page 1 of 1

pixel and line

PostPosted: Wed Nov 24, 2010 12:16 am
by sportmaster
How can I: put pixel, define it's colour, draw line and determine line's colour ?

Re: pixel and line

PostPosted: Wed Nov 24, 2010 6:02 am
by skydereign
There is no way to check a pixels color, there is a getpixel example on the forums, but you can't do this without creating an array. To put a pixel, you use the function putpixel.
Code: Select all
putpixel(x,y);


To draw a line, use lineto. It will draw a line from the current position (the pen) to the specified (x,y).
Code: Select all
lineto(x,y);


To move where the pen of the actor is, use moveto.
Code: Select all
moveto(x,y);


To set the color of the pixel, or the line, use setpen.
Code: Select all
setpen(r,g,b,transparency,size);

Re: pixel and line

PostPosted: Thu Nov 25, 2010 6:33 am
by sportmaster
Your advices were very usefull. I've managed to create the game with a line. Thanks to you, the game is completed :) http://game-editor.com/forum/viewtopic.php?f=6&t=9437