Made this just for fun. User draws a little multi-color doodle and then the program makes a border pattern with it.
Opps, I forgot to put in the code. Here it is.
gosub set_up
do
gosub set_screen
gosub check_keys
gosub colors_draw
gosub pre_loop
loop
set_screen:
cls 0
rem mouse coords and mouseclick check
xp=mousex():yp=mousey():mc=mouseclick()
rem paste image to retain what is drawn in blue box
paste image whole_screen,0,0
rem blue box
ink rgb(50,50,255),0
line 294,426,346,426
line 346,426,346,478
line 346,478,294,478
line 294,478,294,426
rem palette and choosen color box
paste image palette,520,390
if xp>520 and yp>388 and xp<639 and yp<479
ink rgb(rgbr(c3),rgbg(c3),rgbb(c3)),0
box 601,364,638,388
endif
ink rgb(rgbr(c1),rgbg(c1),rgbb(c1)),0
box 520,364,556,388
rem text
ink rgb(255,255,255),0
text 450,464,"Space= "+str$(step_size)
text 50,0,"Draw various colored doodles in blue box and press 'b' to make border"
text 50,15,"Press 'c' to clear the screen of border"
text 50,30,"Press 'x' to leave border and clear blue square"
text 50,45,"Press 'z' to clear screen completely"
text 50,60,"Press up/down arrows to inc/dec space that goes between pattern"
return
check_keys:
rem inc/dec space between pasted sprites
if upkey()=1 and uflag=0 then uflag=1:inc step_size
if downkey()=1 and dflag=0 then dflag=1:dec step_size
if step_size<1 then step_size=1
if step_size>50 then step_size=50
rem make border
if inkey$()="b" then gosub make_border
rem clears screen of just the border and keeps pattern
if inkey$()="c"
get image pic_one,295,427,345,477
cls 0
paste image pic_one,295,427
endif
rem clears blue box of pattern
if inkey$()="x" then paste image new_pic,295,427
rem clears all screen
if inkey$()="z" then cls 0
return
colors_draw:
rem shows various colors from color palette
rem when mouse is rolled over it
if xp>520 and yp>388 and xp<639 and yp<479
c3=point(xp,yp)
ink rgb(rgbr(c3),rgbg(c3),rgbb(c3)),0
box 601,364,638,388
endif
rem this selects foreground color
if mc=1 and mke=0 and xp>520 and yp>388 and xp<639 and yp<479
mke=1
c1=point(xp,yp)
ink rgb(rgbr(c1),rgbg(c1),rgbb(c1)),0
box 520,364,556,388
endif
rem this draws single lines with mouseclick (left-foreground color) (right-background color)
oldx=x3
oldy=y3
if mc=1 and xp>294 and yp>428 and xp<345 and yp<477
x3=mousex()
y3=mousey()
ink rgb(rgbr(c1),rgbg(c1),rgbb(c1)),0
if oldx>0 and oldy>0
line oldx,oldy,x3,y3
endif
endif
if mc=0 then x3=0 : y3=0
oldx=x2
oldy=y2
return
pre_loop:
rem contols speed of key input and mouseclicks
if mc=0 and mke=1 then mke=0
if upkey()=0 and uflag=1 then uflag=0
if downkey()=0 and dflag=1 then dflag=0
sync
rem gets a new image of the whole screen
get image whole_screen,0,0,400,479
copy bitmap 1,0
return
make_border:
rem gets new image of whole screen
get image whole_screen,0,0,639,479
rem get two images and names of the pattern
get image pic_one,295,427,345,477
get image disposable_pic,295,427,345,477
rem make 1st sprite of first image and continuely paste it a space apart horizonally
sprite 1,700,500,disposable_pic
for x=0 to 160 step step_size
paste sprite 1,x,240
sync
next x
rem rotate 2nd image and get a new image of it rotated
rotate image disposable_pic,270
paste image disposable_pic,0,0
get image pic_two,0,0,50,50
rem paste the new image of rotated 2nd image and make 2nd sprite
paste image pic_two,0,0
sprite 2,700,500,pic_two
rem paste 2nd sprite continuely a space apart vertically
for y=240 to 400 step step_size
paste sprite 2,0,y
sync
next y
rem get rid of the rotated image
delete image disposable_pic
rem paste the image of the unrotated pattern inside blue box
paste image pic_one,295,427
copy bitmap 1,0
return
set_up:
cls 0:sync on
rem make a new bitmap to draw on
create bitmap 1,screen width(),screen height()
rem create names for the images used and then get them
pic_one=1
pic_two=2
whole_screen=3
palette=4
new_pic=5
disposable_pic=6
load image "palette panel 01.bmp",palette
paste image palette,520,411
get image whole_screen,0,0,400,479
get image pic_one,295,427,345,477
get image new_pic,295,427,345,477
get image disposable_pic,295,427,345,477
rem variable for space between sprites and starting color for drawing
step_size=7: c1=point(600,450)
cls 0
return