Page 1 of 1

Simple canvas commands

PostPosted: Tue Dec 20, 2011 4:12 am
by Hblade
These commands could probably help you do things a tad bit faster. very simple stuff :3
Code: Select all
void makeline(int X, int Y, int Width, int Height){moveto(X, Y);lineto(Width, Height);}
void erasepixel(int X, int Y) {setpen(0, 0, 0, 1, 1);putpixel(X, Y);}
void eraseline(int X, int Y, int Width, int Height){setpen(0, 0, 0, 1, 1);moveto(X,Y);lineto(Width,Height);}


makeline(x, y, width height); will draw a line at a location you pick without typing more commands to move it and draw it
erasepixel(x, y); will erase a pixel in your told-spot.
eraseline(X, Y, Width, Height); will erase a line, almost like erase pixel but uses lineto instead.

Re: Simple canvas commands

PostPosted: Tue Dec 20, 2011 4:32 am
by SuperSonic
Ooooh, neat :P

Re: Simple canvas commands

PostPosted: Tue Dec 20, 2011 3:01 pm
by Hblade
ty xD

Re: Simple canvas commands

PostPosted: Tue Dec 20, 2011 3:04 pm
by SuperSonic
I was actually thinking about how to make an erase pixel function not long ago but I was just too lazy to do it XD

Re: Simple canvas commands

PostPosted: Tue Dec 20, 2011 3:09 pm
by Hblade
xDD