How to draw straight lines and rectangles?

Posted:
Tue Feb 10, 2009 4:01 pm
by BloodRedDragon
I was wondering how you would allow the user to draw straight lines and rectangles/circles inside a canvas actor in game. Does anyone know? I know how to allow the user to just draw freehand, but that's about it.

Re: How to draw straight lines and rectangles?

Posted:
Tue Feb 10, 2009 4:07 pm
by DST
erase(255,255,255,1);
setpen(255,0,0,0,3);
moveto(0, 0);
lineto(100, 100);
moveto(200,200);
lineto(250, 200);
lineto(250,250);
lineto(200, 250);
lineto(200, 200);