Simple canvas commands
Posted: Tue Dec 20, 2011 4:12 am
These commands could probably help you do things a tad bit faster. very simple stuff :3
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.
- 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.