sync on
set display mode 800,600,32
set window on
INK RGB(255,255,255), RGB(0,0,0)
Name$="image.bmp"
line#=1
do
mousex#=MOUSEX()
mousey#=MOUSEY()
Text 0,0, "Press 1 for white"
Text 0,20, "press 2 for Blue"
text 120,0, "Press 3 for red"
text 120,20, "Press 4 for yellow"
text 610,0, "Press 9 to draw a line"
text 610,15, "Press 8 to draw a circle"
text 610,30, "Press 7 to make bubbles.."
text 0,580, "Press SPACE to clear the screen"
text 250,580, "Press ENTER to save the image"
text 500,580, "Press ESCAPE to exit"
if scancode()=2 then ink RGB(255,255,255), RGB(0,0,0)
if scancode()=5 then ink RGB(255,255,0), RGB(0,0,0)
if scancode()=3 then ink RGB(0,0,255), RGB(0,0,0)
if scancode()=4 then ink rgb(255,0,0), rgb(0,0,0)
If spacekey()=1 then cls
if scancode()=10 : line#=1 : circle#=0 : bubbles#=0 : endif
If scancode()=9 : line#=0 : circle#=1 : bubbles#=0 : endif
If scancode()=8 : line#=0 : circle#=0 : bubbles#=1 : endif
If scancode()=28
hide mouse
save bitmap Name$
show mouse
endif
if mouseclick()=1 and mousey#<580 and mousey#>50
if circle#=1 then circle mousex#, mousey#, 10
if line#=1 then line mousex#, mousey#, mousex#, mousey#
if bubbles#=1 then circle mousex#, mousey#, mousemovey()
endif
line 0,50,800,50
line 0,580,800,580
sync
loop