nomainwin 'Closes the main window before the program runs.
'notice "This program will only display correctly if the screen size is equal to 1024 X 768."
playwave "",async ' Stops any previous wave files from playing.
on error goto [errorHandler] ' Traps any errors that happen - generates an error notice.
act=0: pensize=3: colour$="black": cycle=0: fileName$="": rool=0
dim ink(3): ink(1)=0: ink(2)=0: ink(3)=0: count=0: dim opt$(10)
opt$(1)="Draw": opt$(2)="Circle": opt$(3)="Spray": opt$(4)="Circle filled": opt$(5)="Noise"
opt$(6)="1 Corner line": opt$(7)="2 Corner line": opt$(8)="3 Corner line": opt$(9)="4 Corner line"
opt$(10)="Stepped circles"
dim cl$(21): cl$(1)="Black": cl$(2)="White": cl$(3)="Dark red": cl$(4)="Red": cl$(5)="Dark green"
cl$(6)="Green": cl$(7)="Dark blue":cl$(8)="Blue": cl$(9)="Dark pink": cl$(10)="Pink": cl$(11)="Dark cyan"
cl$(12)="Cyan": cl$(13)="Dark gray": cl$(14)="Gray": cl$(15)="Brown": cl$(16)="Yellow"
cl$(17)="Cycle red": cl$(18)="Cycle green": cl$(19)="Cycle blue": cl$(20)="Cycle gray"
cl$(21)="Random"
dim fl$(10): fl$(1)="Fill solid colour": fl$(2)="Rainbow red": fl$(3)="Rainbow green"
fl$(4)="Rainbow blue": fl$(5)="Rainbow gray": fl$(6)="Rainbow yellow"
fl$(7)="Rainbow random": fl$(8)="Stellar lines"
dim ef$(10): ef$(1)="Stars": ef$(2)="Space": ef$(3)="Sky": ef$(4)="Ground": ef$(5)="Grass"
ef$(6)="Buildings": ef$(7)="Snow": ef$(8)="Drip"
goto [main] ' Moves to main program - Anything between are routines, called from the main program.
'-----------------------------------------------------------------------------------------------------------------------------------------------------------------
[errorHandler]
'This routine handles any errors and traps them aswell as showing them to the user via a notice.
notice "Error string is " + chr$(34) + Err$ + chr$(34)
wait
'-----------------------------------------------------------------------------------------------------------------------------------------------------------------
[quit]
'This routine stops any sound and closes the program.
playwave "",async
unloadbmp "KeepIt"
close#1
end
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[drawsprites]
'This routine draws icons n stuff then turns them into buttons for use in the main program.
WindowWidth=200: WindowHeight=200
open "Sprite screen" for graphics_nf_nsb as#2
#2 "down; fill darkblue; backcolor darkblue; color 100 100 100; place 10 10; box 20 20"
'wait
close#2
return
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[info]
print#1.a,pensize
print#1.ink,"fill ";ink(1);" ";ink(2);" ";ink(3);" "
print #1.canvas, "getbmp KeepIt 0 0 1000 500;"
if act=1 then print#1.info,"Act = Draw"
if act=2 then print#1.info,"Act = Circle"
if act=3 then print#1.info,"Act = Fill in Solid colour"
if act=4 then print#1.info,"Act = Rainbow red"
if act=5 then print#1.info,"Act = Rainbow green"
if act=6 then print#1.info,"Act = Rainbow blue"
if act=7 then print#1.info,"Act = Rainbow gray"
if act=8 then print#1.info,"Act = Rainbow yellow"
if act=9 then print#1.info,"Act = Rainbow random"
if act=10 then print#1.info,"Act = Stellar lines"
if act=11 then print#1.info,"Act = Spray"
if act=12 then print#1.info,"Act = Circle filled"
if act=13 then print#1.info,"Act = Stars"
if act=14 then print#1.info,"Act = Space"
if act=15 then print#1.info,"Act = Sky"
if act=16 then print#1.info,"Act = Ground"
if act=17 then print#1.info,"Act = Grass"
if act=18 then print#1.info,"Act = Buildings"
if act=19 then print#1.info,"Act = Snow"
if act=20 then print#1.info,"Act = Noise"
if act=21 then print#1.info,"Act = Upper Left Corner line"
if act=22 then print#1.info,"Act = Upper Left / Upper right Corner Line"
if act=23 then print#1.info,"Act = Upper Left / Upper Right / Lower Left Corner line"
if act=24 then print#1.info,"Act = Upper Left / Upper Right / Lower Left /Lower Right Corner line"
if act=25 then print#1.info,"Act = Stepped circles"
if act=26 then print#1.info,"Act = Drip"
return
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[draw]
' This routine sets the drawing mode on the canvas.
act=1
gosub [info]
wait
'-----------------------------------------------------------------------------------------------------------------------------------------------------------------
'-----------------------------------------------------------------------------------------------------------------------------------------------------------------
[draw2]
if cycle=1 then
ink(1)=ink(1)+1
if ink(1)>255 then ink(1)=0
print#1.ink,"fill ";ink(1);" ";ink(2);" ";ink(3);" "
end if
if cycle=2 then
ink(2)=ink(2)+1
if ink(2)>255 then ink(2)=0
print#1.ink,"fill ";ink(1);" ";ink(2);" ";ink(3);" "
end if
if cycle=3 then
ink(3)=ink(3)+1
if ink(3)>255 then ink(3)=0
print#1.ink,"fill ";ink(1);" ";ink(2);" ";ink(3);" "
end if
if cycle=4 then
ink(1)=ink(1)+1
ink(2)=ink(2)+1
ink(3)=ink(3)+1
if ink(1)>255 then ink(1)=0
if ink(2)>255 then ink(2)=0
if ink(3)>255 then iink(3)=0
print#1.ink,"fill ";ink(1);" ";ink(2);" ";ink(3);" "
end if
if cycle=5 then
ink(1)=int(rnd(1)*255) + 1
if ink(1)<0 or ink(1)>255 then ink(1)=45
ink(2)=int(rnd(1)*255) + 1
if ink(2)<0 or ink(2)>255 then ink(2)=45
ink(3)=int(rnd(1)*255) + 1
if ink(3)<0 or ink(3)>255 then ink(3)=45
print#1.ink,"fill ";ink(1);" ";ink(2);" ";ink(3);" "
end if
if act=1 then
xx=MouseX:yy=MouseY
#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);";"
#1.canvas,"set ";xx;" ";yy;";"
end if
if act=2 then
xx=MouseX:yy=MouseY
#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);";"
#1.canvas,"place ";xx;" ";yy;"; circle ";pensize;";"
end if
if act=3 then
print #1.canvas,"fill ";ink(1);" ";ink(2);" ";ink(3);";"
end if
if act=4 then
count=0
for yy=0 to 500 step 1
count=count+1: if count>255 then count=255
print#1.canvas,"color ";count;" 0 0; line 0 ";yy;" 1000 ";yy;";"
next yy
end if
if act=5 then
count=0
for yy=0 to 500 step 1
count=count+1: if count>255 then count=255
print#1.canvas,"color 0 ";count;" 0; line 0 ";yy;" 1000 ";yy;";"
next yy
end if
if act=6 then
count=0
for yy=0 to 500 step 1
count=count+1: if count>255 then count=255
print#1.canvas,"color 0 0 ";count;"; line 0 ";yy;" 1000 ";yy;";"
next yy
end if
if act=7 then
count=0
for yy=0 to 500 step 1
count=count+1: if count>255 then count=255
print#1.canvas,"color ";count;" ";count;" ";count;"; line 0 ";yy;" 1000 ";yy;";"
next yy
end if
if act=8 then
count=0
for yy=0 to 500 step 1
count=count+1: if count>255 then count=255
print#1.canvas,"color ";count;" ";count;" 0; line 0 ";yy;" 1000 ";yy;";"
next yy
end if
if act=9 then
count=0
for yy=0 to 500 step 16
counta=int(rnd(1)*255) + 1
countb=int(rnd(1)*255) + 1
countc=int(rnd(1)*255) + 1
if counta<1 or counta>255 then counta=1
if countb<1 or countb>255 then countb=1
if countc<1 or countc>255 then countc=1
print#1.canvas,"backcolor ";counta;" ";countb;" ";countc;"; place 0 ";yy;"; boxfilled 1000 ";yy+8;";"
next yy
end if
if act=10 then
i=ink(1): ii=ink(2): iii=ink(3)
for xx=0 to 1000
ink(1)=ink(1)+1: if ink(1)>255 then ink(1)=255
ink(2)=ink(2)+1: if ink(2)>255 then ink(2)=255
ink(3)=ink(3)+1: if ink(3)>255 then ink(3)=255
print#1.canvas,"color "; ink(1);" ";ink(2);" ";ink(3);"; line 500 250 ";xx;" 0;"
next xx
ink(1)=i: ink(2)=ii: ink(3)=iii
for yy=0 to 500
ink(1)=ink(1)+1: if ink(1)>255 then ink(1)=255
ink(2)=ink(2)+1: if ink(2)>255 then ink(2)=255
ink(3)=ink(3)+1: if ink(3)>255 then ink(3)=255
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);"; line 500 250 1000 ";yy;";"
next yy
ink(1)=i: ink(2)=ii: ink(3)=iii
for xx=1000 to 0 step -1
ink(1)=ink(1)+1: if ink(1)>255 then ink(1)=255
ink(2)=ink(2)+1: if ink(2)>255 then ink(2)=255
ink(3)=ink(3)+1: if ink(3)>255 then ink(3)=255
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);"; line 500 250 ";xx;" 500;"
next xx
ink(1)=i: ink(2)=ii: ink(3)=iii
for yy=500 to 0 step -1
ink(1)=ink(1)+1: if ink(1)>255 then ink(1)=255
ink(2)=ink(2)+1: if ink(2)>255 then ink(2)=255
ink(3)=ink(3)+1: if ink(3)>255 then ink(3)=255
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);"; line 500 250 0 ";yy;";"
next yy
end if
if act=11 then
xx=MouseX-5+int(rnd(1)*10) + 1
yy=MouseY-5+int(rnd(1)*10) + 1
print#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);"; set ";xx;" ";yy;";"
end if
if act=12 then
xx=MouseX:yy=MouseY
#1.canvas,"backcolor ";ink(1);" ";ink(2);" ";ink(3);"; color ";ink(1);" ";ink(2);" ";ink(3);";"
#1.canvas,"place ";xx;" ";yy;"; circlefilled ";pensize;";"
end if
if act=13 then
' insert stars here
for count=1 to 100
xx=0+int(rnd(1)*1000) + 1: yy=0+int(rnd(1)*250) + 1
print#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);"; set ";xx;" ";yy;";"
next count
end if
if act=14 then
'insert space here
for count=1 to 100
xx=0+int(rnd(1)*1000) + 1: yy=0+int(rnd(1)*500) + 1
print#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);"; set ";xx;" ";yy;";"
next count
end if
if act=15 then
'insert sky here
for count=0 to 250 step 1
ink(1)=ink(1)+1: if ink(1)>255 then ink(1)=255
ink(2)=ink(2)+1: if ink(2)>255 then ink(2)=255
ink(3)=ink(3)+1: if ink(3)>255 then ink(3)=255
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);"; line 0 ";count;" 1000 ";count;";"
next count
end if
if act=16 then
'insert ground here
for count=251 to 500 step 1
ink(1)=ink(1)+1: if ink(1)>255 then ink(1)=255
ink(2)=ink(2)+1: if ink(2)>255 then ink(2)=255
ink(3)=ink(3)+1: if ink(3)>255 then ink(3)=255
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);"; line 0 ";count;" 1000 ";count;";"
next count
end if
if act=17 then
for x=0 to 1000 step 1
a=255+int(rnd(1)*10) + 1: b=255-int(rnd(1)*10)
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);"; line ";x;" ";a;" ";x;" ";b;";"
next x
end if
if act=18 then
for x=0 to 1000 step 10
a=255-int(rnd(1)*100) + 1
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);"; backcolor ";ink(1);" ";ink(2);" ";ink(3);";"
print#1.canvas,"place ";x;" 256; boxfilled ";x+10;" ";a;";"
next x
end if
if act=19 then
for count=1 to 500
x=1+int(rnd(1)*1000) + 1: y=1+int(rnd(1)*500) + 1: z=1+int(rnd(1)*5) + 1
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);"; backcolor ";ink(1);" ";ink(2);" ";ink(3);"; size ";z;"; set ";x;" ";y;";"
next count
end if
if act=20 then
y=MouseY-1+int(rnd(1)*10) + 1: yy=MouseY+1+int(rnd(1)*10) + 1
print#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);";"
print#1.canvas,"line ";MouseX;" ";y;" ";MouseX;" ";yy;";"
end if
if act=21 then
print#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);";"
print#1.canvas,"line 0 0 ";MouseX;" ";MouseY;";"
end if
if act=22 then
print#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);";"
print#1.canvas,"line 0 0 ";MouseX;" ";MouseY;";"
print#1.canvas,"line 1000 0 ";MouseX;" ";MouseY;";"
end if
if act=23 then
print#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);";"
print#1.canvas,"line 0 0 ";MouseX;" ";MouseY;";"
print#1.canvas,"line 1000 0 ";MouseX;" ";MouseY;";"
print#1.canvas,"line 0 500 ";MouseX;" ";MouseY;";"
end if
if act=24 then
print#1.canvas,"size ";pensize;"; color ";ink(1);" ";ink(2);" ";ink(3);";"
print#1.canvas,"line 0 0 ";MouseX;" ";MouseY;";"
print#1.canvas,"line 1000 0 ";MouseX;" ";MouseY;";"
print#1.canvas,"line 0 500 ";MouseX;" ";MouseY;";"
print#1.canvas,"line 1000 500 ";MouseX;" ";MouseY;";"
end if
if act=25 then
for count=1 to pensize step 3
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);";"
print#1.canvas,"size 1; place ";MouseX;" ";MouseY;"; circle ";count;";"
next count
end if
if act=26 then
for count=1 to 1+int(rnd(1)*50) + 1
x=1+int(rnd(1)*1000) + 1
for y=1 to 1+int(rnd(1)*500) + 1
s=1+int(rnd(1)*15) + 1
print#1.canvas,"color ";ink(1);" ";ink(2);" ";ink(3);";"
print#1.canvas,"size ";s;";"
print#1.canvas,"set ";x;" ";y;";"
next y
next count
end if
print#1.ink,"fill ";ink(1);" ";ink(2);" ";ink(3);" "
wait
'-----------------------------------------------------------------------------------------------------------------------------------------------------------------
[pensizedown]
pensize=pensize-1
if pensize<1 then pensize=1
gosub [info]
wait
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
[pensizeup]
pensize=pensize+1
if pensize>700 then pensize=700
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[circle]
act=2
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[circlefilled]
act=12
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[noise]
act=20
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[clns]
act=21
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[clns1]
act=22
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[clns2]
act=23
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[rsz]
act=25
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[clns3]
act=24
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[spray]
act=11
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[undu]
print#1.canvas,"fill white;"
print#1.canvas,"drawbmp KeepIt 0 0; flush";
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[reddown]
ink(1)=ink(1)-10
if ink(1)<0 then ink(1)=0
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[redup]
ink(1)=ink(1)+10
if ink(1)>255 then ink(1)=255
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[greendown]
ink(2)=ink(2)-10
if ink(2)<0 then ink(2)=0
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[greenup]
ink(2)=ink(2)+10
if ink(2)>255 then ink(2)=255
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[bluedown]
ink(3)=ink(3)-10
if ink(3)<0 then ink(3)=0
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[blueup]
ink(3)=ink(3)+10
if ink(3)>255 then ink(3)=255
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[media]
print #1.l1, "selection? selection$"
if selection$="Draw" then gosub [draw]
if selection$="Circle" then gosub [circle]
if selection$="Spray" then gosub [spray]
if selection$="Circle filled" then gosub [circlefilled]
if selection$="Noise" then gosub [noise]
if selection$="1 Corner line" then gosub [clns]
if selection$="2 Corner line" then gosub [clns1]
if selection$="3 Corner line" then gosub [clns2]
if selection$="4 Corner line" then gosub [clns3]
if selection$="Stepped circles" then gosub [rsz]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[colour]
print #1.l2, "selection? selection$"
if selection$="Black" then ink(1)=0: ink(2)=0: ink(3)=0: cycle=0
if selection$="White" then ink(1)=255: ink(2)=255: ink(3)=255: cycle=0
if selection$="Dark red" then ink(1)=235: ink(2)=18: ink(3)=29: cycle=0
if selection$="Red" then ink(1)=255: ink(2)=0: ink(3)=0: cycle=0
if selection$="Dark green" then ink(1)=0: ink(2)=126: ink(3)=0: cycle=0
if selection$="Green" then ink(1)=0: ink(2)=255: ink(3)=0: cycle=0
if selection$="Dark blue" then ink(1)=0: ink(2)=0: ink(3)=126: cycle=0
if selection$="Blue" then ink(1)=0: ink(2)=0: ink(3)=255: cycle=0
if selection$="Dark pink" then ink(1)=200: ink(2)=50: ink(3)=200: cycle=0
if selection$="Pink" then ink(1)=255: ink(2)=126: ink(3)=255: cycle=0
if selection$="Dark cyan" then ink(1)=0: ink(2)=126: ink(3)=126: cycle=0
if selection$="Cyan" then ink(1)=0: ink(2)=255: ink(3)=255: cycle=0
if selection$="Dark gray" then ink(1)=50: ink(2)=50: ink(3)=50: cycle=0
if selection$="Gray" then ink(1)=167: ink(2)=167: ink(3)=167: cycle=0
if selection$="Brown" then ink(1)=138: ink(2)=0: ink(3)=21: cycle=0
if selection$="Yellow" then ink(1)=255: ink(2)=242: ink(3)=0: cycle=0
if selection$="Cycle red" then cycle=1: ink(1)=0: ink(2)=0: ink(3)=0
if selection$="Cycle green" then cycle=2: ink(1)=0: ink(2)=0: ink(3)=0
if selection$="Cycle blue" then cycle=3: ink(1)=0: ink(2)=0: ink(3)=0
if selection$="Cycle gray" then cycle=4: ink(1)=0: ink(2)=0: ink(3)=0
if selection$="Random" then cycle=5
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[fillstyle]
print #1.l3, "selection? selection$"
if selection$="Fill solid colour" then act=3
if selection$="Rainbow red" then act=4
if selection$="Rainbow green" then act=5
if selection$="Rainbow blue" then act=6
if selection$="Rainbow gray" then act=7
if selection$="Rainbow yellow" then act=8
if selection$="Rainbow random" then act=9
if selection$="Stellar lines" then act=10
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[effects]
print #1.l4, "selection? selection$"
if selection$="Stars" then act=13
if selection$="Space" then act=14
if selection$="Sky" then act=15
if selection$="Ground" then act=16
if selection$="Grass" then act=17
if selection$="Buildings" then act=18
if selection$="Snow" then act=19
if selection$="Drip" then act=26
gosub [info]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ldpic]
confirm "Your current picture will be lost!"; answer$
if answer$ = "no" then wait
filedialog "Open BMP file", "*.bmp", fileName$
if fileName$="" then wait
close#1
loadbmp "piccy",fileName$
goto [main]
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[svpic]
print #1.canvas, "getbmp KeepIt 0 0 990 490;"
filedialog "Save BMP file", "*.bmp", fileName$
if fileName$="" then wait
bmpsave "KeepIt", fileName$+".bmp"
print#1.canvas,"fill white;"
print#1.canvas,"drawbmp KeepIt 0 0; flush";
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[r1]
rool=1
gosub [checkrule]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[checkrule]
if rool=0 then print#1.canvas,"rule ";_R2_COPYPEN
if rool=1 then print#1.canvas,"rule ";_R2_NOTXORPEN
if rool=2 then print#1.canvas,"rule ";_R2_NOT
print #1.canvas,"size ";pensize;";"
return
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[r2]
rool=0
gosub [checkrule]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[r3]
rool=2
gosub [checkrule]
wait
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
[main]
'550 down = montor size
gosub [drawsprites] ' Calls the button picture drawing routine.
'button#1.b1,"Draw",[draw],ul,10,520,50,20 'Selects the drawing mode.
button#1.b2,"Size <",[pensizedown],ul,50,520,50,20
button#1.b3,"Size >",[pensizeup],ul,160,520,50,20
button#1.undu,"Undo",[undu],ul,950,520,60,40
'button#1.b4,"Circle",[circle],ul,240,520,50,20
button#1.b5,"Red <",[reddown],ul,840,575,50,20
button#1.b6,"Red >",[redup],ul,895,575,50,20
button#1.b7,"Green <",[greendown],ul,840,600,50,20
button#1.b8,"Green >",[greenup],ul,895,600,50,20
button#1.b9,"Blue <",[bluedown],ul,840,625,50,20
button#1.b10,"Blue >",[blueup],ul,895,625,50,20
button#1.b11,"Load Picture",[ldpic],ul,220,520,100,20
button#1.b12,"Save Picture",[svpic],ul,330,520,100,20
button#1.b13,"XOR",[r1],ul,500,520,50,20
button#1.b14,"NORMAL",[r2],ul,560,520,50,20
button#1.b15,"NOT",[r3],ul,620,520,50,20
ListboxColor$="Yellow":listbox #1.l1, opt$(), [media], 10, 570, 150, 150
ListboxColor$="red": listbox#1.l2,cl$(),[colour],840,680,170,29
ListboxColor$="pink": listbox#1.l3,fl$(),[fillstyle],170,570,150,150
ListboxColor$="cyan": listbox#1.l4,ef$(),[effects],330,570,150,150
statictext#1.c,"Drawing Tool",40,547,200,25
statictext#1.cc,"Standard Colour",870,655,150,25
statictext#1.ccc,"Fill Styles",210,547,100,25
statictext#1.cccc,"Effects",380,547,150,25
TextboxColor$="white": Textbox#1.a,110,517,40,25
TextboxColor$="white": Textbox#1.info,10,720,1000,40
graphicbox#1.ink,950,570,60,80
graphicbox#1.canvas,10,10,1000,500 'Sets up the canvas graphicbox to draw on.
BackgroundColor$="darkgray": ForegroundColor$="black" ' Sets up background and foreground colors.
'UpperLeftX=1
'UpperLeftY=1
WindowWidthX=1280
WindowHeight=500
open "Random-Paint by J.Golding 2011" for window as#1 ' Open the the programs main screen.
print#1,"Trapclose [quit]" ' Sets the close button to goto the quit routine.
print#1.l1,"Font Arial 8 Bold": print #1.l1, "singleclickselect"
print#1.l2,"Font Arial 15 Bold": print #1.l2, "singleclickselect"
print#1.l3,"Font Arial 9 Bold": print #1.l3, "singleclickselect"
print#1.l4,"Font Arial 9 Bold": print #1.l4, "singleclickselect"
print#1.c,"!Font Arial 10 Bold": print#1.cc,"!Font Arial 10 Bold": print#1.ccc,"!Font Arial 10 Bold"
print#1.cccc,"!Font Arial 10 Bold"
print#1.info,"!Font Arial 16 Bold": #1.info,"!Disable"
print#1.a,"!Font Arial_8 Bold;": print#1.a,"!Disable"
print#1.ink,"home; down; fill ";ink(1);" ";ink(2);" ";ink(3);" "
print#1.info,"SELECT and then CLICK on a Drawing Tool / Fill Style / Effect to select it."
gosub [checkrule]
gosub [info]
#1.canvas,"home; down; color black; backcolor white;"
#1.canvas,"when leftButtonMove [draw2]"
#1.canvas,"when leftButtonDown [draw2]"
if fileName$<>"" then print#1.canvas,"drawbmp piccy 0 0;"
print#1.canvas,"flush;"
wait ' Wait for user input.
No comments:
Post a Comment