Here's my art program that I never came to finish, many thanks to TDK and Zergei for their help with the linetool. It's my first complete program so it has a less than good GUI and the box tool only draws a box when the mouse is dragged down and right but I'm sure someone will know how to fix that.
REM Project: Art Program
REM Created: 10/05/2007 20:15:02
REM
REM ***** Main Source File *****
REM
sync on
sync rate 0
global x1 as integer
global y1 as integer
global xtemp as integer
global ytemp as integer
global drawing as boolean
get image 1,0,0,screen width(), screen height(),1
tool=1
do
box 0,0,30,780,RGB(150,150,150),RGB(150,150,150),RGB(150,150,150),RGB(150,150,150)
box 10,10,20,20
box 10,30,20,40,RGB(150,0,0),RGB(150,0,0),RGB(150,0,0),RGB(150,0,0)
box 10,50,20,60,RGB(0,150,0),RGB(0,150,0),RGB(0,150,0),RGB(0,150,0)
box 10,70,20,80,RGB(0,0,150),RGB(0,0,150),RGB(0,0,150),RGB(0,0,150)
box 10,90,20,100,RGB(0,150,150),RGB(0,150,150),RGB(0,150,150),RGB(0,150,150)
if controlkey()=1
cls
box 0,0,30,780,RGB(150,150,150),RGB(150,150,150),RGB(150,150,150),RGB(150,150,150)
box 10,10,20,20
box 10,30,20,40,RGB(150,0,0),RGB(150,0,0),RGB(150,0,0),RGB(150,0,0)
box 10,50,20,60,RGB(0,150,0),RGB(0,150,0),RGB(0,150,0),RGB(0,150,0)
box 10,70,20,80,RGB(0,0,150),RGB(0,0,150),RGB(0,0,150),RGB(0,0,150)
box 10,90,20,100,RGB(0,150,150),RGB(0,150,150),RGB(0,150,150),RGB(0,150,150)
endif
if mousex()>10 and mousex()<20 and mousey()>10 and mousey()<20 and mouseclick()=1
tool=1
endif
if mousex()>10 and mousex()<20 and mousey()>30 and mousey()<40 and mouseclick()=1
tool=2
endif
if mousex()>10 and mousex()<20 and mousey()>50 and mousey()<60 and mouseclick()=1
tool=3
endif
if mousex()>10 and mousex()<20 and mousey()>70 and mousey()<80 and mouseclick()=1
tool=4
endif
if mousex()>10 and mousex()<20 and mousey()>90 and mousey()<100 and mouseclick()=1
tool=5
endif
if tool=1
dottool()
endif
if tool=2
spraypaint()
endif
if tool=3
linetool()
endif
if tool=4
circletool()
endif
if tool=5
boxtool()
endif
if shiftkey()=1 and scancode()=31
get image 1,30,0,screen width(),screen height(),1
save image "Untitled.jpg",1
endif
sync
loop
function dottool()
if mousex()>30
if mouseclick()=1
ink RGB(255,255,255),0
dot mousex(),mousey()
endif
endif
endfunction
function spraypaint()
if mousex()>30
if mouseclick()=1
ink RGB(255,255,255),0
for SPD=1 to 11
dot mousex()-10+rnd(20),mousey()-10+rnd(20)
next SPD
endif
endif
endfunction
function circletool()
if drawing = 0 and mouseclick()=1
x1=mousex() : y1=mousey()
drawing = 1
endif
if mouseclick()=0
drawing=0
get image 1,0,0,screen width(),screen height(),1
x1=0 : y1=0
else
paste image 1,0,0
ellipse x1,y1,mousex()-x1,mousey()-y1
endif
endfunction
function linetool()
local xr as integer
local yr as integer
local borders as integer
ink RGB(255,255,255),0
borders = 5
if drawing = 0 and mouseclick()=1
x1=mousex() : y1=mousey()
if x1<borders
x1=borders
endif
if x1>bitmap width()-borders
x1=bitmap width()-borders
endif
if y1<borders
y1=borders
endif
if y1>bitmap height()-borders
y1=bitmap height()-borders
endif
xtemp=x1 : ytemp=y1 : xr=mousex() : yr=mousey()
if xr<borders
xr=borders
endif
if xr>bitmap width()-borders
xr=bitmap width()-borders
endif
if yr<borders
yr=borders
endif
if yr>bitmap height()-borders
yr=bitmap height()-borders
endif
if x1>=xr
xtemp=xr : xr=x1
endif
if y1>=yr
ytemp=yr : yr=y1
endif
dec xtemp,1 : dec ytemp,1
inc xr,1 : inc yr,1
get image 1,xtemp,ytemp,xr, yr,1
drawing = 1
endif
if mouseclick()=0
drawing=0
x1=0 : y1=0 :xtemp=0 : ytemp=0
else
paste image 1,xtemp,ytemp
xtemp=x1 : ytemp=y1 : xr=mousex() : yr=mousey()
if xr<borders
xr=borders
endif
if xr>bitmap width()-borders
xr=bitmap width()-borders
endif
if yr<borders
yr=borders
endif
if yr>bitmap height()-borders
yr=bitmap height()-borders
endif
if x1>=xr
xtemp=xr : xr=x1
endif
if y1>=yr
ytemp=yr : yr=y1
endif
dec xtemp,1 : dec ytemp,1
inc xr,1 : inc yr,1
get image 1,xtemp,ytemp,xr, yr,1
line x1,y1,mousex(),mousey()
endif
endfunction
function boxtool()
if drawing = 0 and mouseclick()=1
x1=mousex() : y1=mousey()
drawing = 1
endif
if mouseclick()=0
drawing=0
get image 1,0,0,screen width(), screen height(),1
x1=0 : y1=0
else
paste image 1,0,0
if x1<mousex() and y1<mousey()
box x1,y1,mousex(),mousey()
endif
if x1<mousex() and mousey()>y1
box x1,mousey(),mousex(),y1
endif
if x1>mousex() and mousey()<y1
box mousex(),y1,x1,mousey()
endif
if x1>mousex() and y1>mousey()
box mousex(),mousey(),x1,y1
endif
endif
endfunction