Hi all,
I am new to FreeBasic
I would like to know if it is possible to display a font (say the word "Signed off" in differnt sizes?
like :
> double standard hight
> triple standard hight
etc etc
any advice would be most welcome
Andy
Steching fonts
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
You might want to look into the XFONT library.
http://www.freebasic.net/forum/viewtopic.php?t=12078
http://www.freebasic.net/forum/viewtopic.php?t=12078
Hi GableaGablea wrote:yes but is there a way I can smooth the font out? so when it is scaled up it is not soo blocky?
Sorry but I just think it looks a little daft blocky when Windows can do a nice smooth font (in vb6)
Here is a little font thing I made up and posted a few months ago, it's just a bit of fun, but the first 710 lines of code comprise a 2d rotator and a sub called paintstring which together will draw fonts of the smoother ilk.
710 lines (quite long) but I had to reproduce every character on my keyboard, little squiggles, pound sign, the lot (British keyboard)
Here is the post in its entirity that is: paintstring and a little demo on its usage.
Code: Select all
'START OF PAINTSTRING ******************************************
Dim Shared np(1 To 4) As Double
Sub rotate(Byval pivot_x As Double,_ 'turns about this point
Byval pivot_y As Double,_
Byval first_x As Double,_ 'centre for circles
Byval first_y As Double,_
Byval second_x As Double, _ 'radius for circles
Byval second_y As Double, _ 'aspect
Byval arc_1 As Double,_ 'arcs only for circle, 0 for lines
Byval arc_2 As Double,_
Byval angle As Double, _ 'all below for circles and lines
Byval magnifier As Double,_
Byval dilator As Double,_
Byval colour As Integer,_
Byval thickness As Double,_
Byref shape As String,_
image As Any Pointer=0)
'rotated line is (np(1),np(2))-(np(3),np(4))
'rotated circle centre is np(3),np(4)
'shape:
'line - draws the line
'linepoint - does the calculation, draws nothing
'linepointset - does the calculations, sets a pixel at the line ends
'ALSO circle,circlepoint, circlepointset,box, boxfill, circlefill.
'arcs from horizontal positive x axis in DEGREES
'arc1<arc2 always e.g from 330 to 430
shape=Lcase$(shape)
Dim p As Double = 4*Atn(1) '(pi)
Dim radians As Double
Dim line_xvector As Double
Dim line_yvector As Double
Dim pivot_xvector As Double
Dim pivot_yvector As Double
Dim th As Double
th=thickness
Dim sx As Double=second_x
angle=angle Mod 360
radians=(2*p/360)*angle 'change from degrees to radians
#Macro thickline(t)
Dim As Double s,h,c
Dim As Uinteger prime=rgb(255,255,255)
h=Sqr(((np(1))-(np(3)))^2+((np(2))-(np(4)))^2)
s=((np(4))-np(2))/h
c=(np(1)-(np(3)))/h
Line image, (np(3)+s*t/2,np(4)+c*t/2)-(np(1)+s*t/2,np(2)+c*t/2),prime
Line image, (np(3)-s*t/2,np(4)-c*t/2)-(np(1)-s*t/2,np(2)-c*t/2),prime
Line image, (np(3)+s*t/2,np(4)+c*t/2)-(np(3)-s*t/2,np(4)-c*t/2),prime
Line image, (np(1)+s*t/2,np(2)+c*t/2)-(np(1)-s*t/2,np(2)-c*t/2),prime
Paint image,((np(3)+np(1))/2, (np(4)+np(2))/2),prime,prime
Line image, (np(3)+s*t/2,np(4)+c*t/2)-(np(1)+s*t/2,np(2)+c*t/2),colour
Line image, (np(3)-s*t/2,np(4)-c*t/2)-(np(1)-s*t/2,np(2)-c*t/2),colour
Line image, (np(3)+s*t/2,np(4)+c*t/2)-(np(3)-s*t/2,np(4)-c*t/2),colour
Line image, (np(1)+s*t/2,np(2)+c*t/2)-(np(1)-s*t/2,np(2)-c*t/2),colour
Paint image,((np(3)+np(1))/2, (np(4)+np(2))/2), colour, colour
#EndMacro
#macro thickcircle(t)
Dim As Uinteger prime=rgb(255,255,255)
Dim As Double xp1,xp2,yp1,yp2
Dim arc1 As Double=arc_1*p/180
Dim arc2 As Double=arc_2*p/180
arc1=2*p+(arc1-(radians))
arc2=2*p+(arc2-(radians))
sx=sx*magnifier
If arc1=arc2 Then
Circle image,(np(3),np(4)),sx+t/2,prime,,,second_y
Circle image,(np(3),np(4)),sx-t/2,prime,,,second_y
Paint image,(np(3),np(4)+sx),prime,prime
Paint image,(np(3)+sx,np(4)),prime,prime
Circle image,(np(3),np(4)),sx+t/2,colour,,,second_y
Circle image,(np(3),np(4)),sx-t/2,colour,,,second_y
Paint image,(np(3),np(4)+sx),colour,colour
Paint image,(np(3)+sx,np(4)),colour,colour
End If
if arc1<>arc2 Then
xp1=np(3)+(sx)*Cos(.5*(arc2+arc1))
yp1=np(4)-(sx)*Sin(.5*(arc2+arc1))
Circle image,(np(3),np(4)),sx+t/2,prime,arc1,arc2,second_y
Circle image,(np(3),np(4)),sx-t/2,prime,arc1,arc2,second_y
Line image,(np(3)+(sx+t/2)*Cos(arc1),np(4)-(sx+t/2)*Sin(arc1))-(np(3)+(sx-t/2)*Cos(arc1),np(4)-(sx-t/2)*Sin(arc1)),prime
Line image,(np(3)+(sx+t/2)*Cos(arc2),np(4)-(sx+t/2)*Sin(arc2))-(np(3)+(sx-t/2)*Cos(arc2),np(4)-(sx-t/2)*Sin(arc2)),prime
Paint image,(xp1,yp1),prime,prime
Circle image,(np(3),np(4)),sx+t/2,colour,arc1,arc2,second_y
Circle image,(np(3),np(4)),sx-t/2,colour,arc1,arc2,second_y
Line image,(np(3)+(sx+t/2)*Cos(arc1),np(4)-(sx+t/2)*Sin(arc1))-(np(3)+(sx-t/2)*Cos(arc1),np(4)-(sx-t/2)*Sin(arc1)),colour
Line image,(np(3)+(sx+t/2)*Cos(arc2),np(4)-(sx+t/2)*Sin(arc2))-(np(3)+(sx-t/2)*Cos(arc2),np(4)-(sx-t/2)*Sin(arc2)),colour
Paint image,(xp1,yp1),colour,colour
End If
#endmacro
magnifier=dilator*magnifier
pivot_xvector=first_x-pivot_x
pivot_yvector=first_y-pivot_y
pivot_xvector=dilator*pivot_xvector
pivot_yvector=dilator*pivot_yvector
Dim mover(1 To 2,1 To 2) As Double
Dim new_pos(1 To 2) As Double
mover(1,1)=Cos(radians)
mover(2,2)=Cos(radians)
mover(1,2)=-Sin(radians)
mover(2,1)=Sin(radians)
line_xvector=magnifier*(second_x-first_x) 'get the vector
line_yvector=magnifier*(second_y-first_y) 'get the vector
new_pos(1)=mover(1,1)*pivot_xvector+mover(1,2)*pivot_yvector +pivot_x
new_pos(2)=mover(2,1)*pivot_xvector+mover(2,2)*pivot_yvector +pivot_y
Dim new_one(1 To 2) As Double 'To hold the turned value
new_one(1)=mover(1,1)*line_xvector+mover(1,2)*line_yvector +first_x
new_one(2)=mover(2,1)*line_xvector+mover(2,2)*line_yvector +first_y
Dim xx As Double 'translation
Dim yy As Double
xx=first_x-new_pos(1)
yy=first_y-new_pos(2)
np(1)=new_one(1)-xx
np(2)=new_one(2)-yy
np(3)=first_x-xx
np(4)=first_y-yy
Select Case shape
Case "line"
If th<2 Then
Line image,(np(3),np(4))-(np(1),np(2)),colour
Else
thickline(th)
End If
Case "circle"
Dim arc1 As Double=arc_1*p/180
Dim arc2 As Double=arc_2*p/180
If arc1=arc2 Then
If th<=3 Then
For n As Double=magnifier*sx-1 To magnifier*sx+1 Step .5
Circle image,(np(3),np(4)),n,colour,,,second_y
'circle image,(np(3),np(4)),magnifier*sx,colour,,,second_y
Next n
Else
thickcircle(th)
End If
Endif
If arc1<>arc2 Then
If th<=3 Then
arc1=2*p+(arc1-(radians))'new
arc2=2*p+(arc2-(radians))'new
For n As Double=magnifier*sx-1 To magnifier*sx+1 Step .5
Circle image,(np(3),np(4)),n,colour,arc1,arc2,second_y
' circle image,(np(3),np(4)),magnifier*sx,colour,arc1,arc2,second_y
Next n
Else
thickcircle(th)
End If
End If
Case "circlefill"
Dim As Double xp1,xp2,yp1,yp2
Dim As Uinteger prime=rgb(255,255,255)
Dim arc1 As Double=arc_1*p/180
Dim arc2 As Double=arc_2*p/180
If arc1=arc2 Then Circle image,(np(3),np(4)),magnifier*sx,colour,,,second_y,F
If arc1<>arc2 Then
xp1=np(3)+magnifier*sx*Cos(.5*(arc2+arc1))*3/4
yp1=np(4)-magnifier*sx*Sin(.5*(arc2+arc1))*3/4
Circle image,(np(3),np(4)),magnifier*sx,prime,arc1,arc2,second_y
Line image,(np(3),np(4))-(np(3)+magnifier*sx*Cos(arc2),np(4)-magnifier*sx*Sin(arc2)),prime
Line image,(np(3),np(4))-(np(3)+magnifier*sx*Cos(arc1),np(4)-magnifier*sx*Sin(arc1)),prime
Paint image,(xp1,yp1),prime,prime
Circle image,(np(3),np(4)),magnifier*sx,colour,arc1,arc2,second_y
Line image,(np(3),np(4))-(np(3)+magnifier*sx*Cos(arc2),np(4)-magnifier*sx*Sin(arc2)),colour
Line image,(np(3),np(4))-(np(3)+magnifier*sx*Cos(arc1),np(4)-magnifier*sx*Sin(arc1)),colour
Paint image,(xp1,yp1),colour,colour
End If
Case"box"
Line image,(np(3),np(4))-(np(1),np(2)),colour,b
Case "boxfill"
Line image,(np(3),np(4))-(np(1),np(2)),colour,bf
Case "linepoint","circlepoint"
'nothing drawn
Case "linepointset","circlepointset"
If shape="linepointset" Then
Pset image,(np(1),np(2)),colour
Pset image,(np(3),np(4)),colour
Endif
If shape="circlepointset" Then
Pset image,(np(3),np(4)),colour
End If
Case Else
Print "unknown rotation shape"
End Select
End Sub
Dim Shared As Double next_x,next_y
Sub paintstring(x As Double,_
y As Double,_
s As String,_
size As Double,_
c As Uinteger,_
line_angle As Double=0,_
char_angle As Double=0,_
thickness_tweak As Double=1,_
image As Any Pointer=0)
Dim l As Integer=Len(s)
Dim px As Double=16*size+x
y=y+16*size
Dim py As Double=y'16*size+y
Dim z As Integer=0
Dim th As Double'=4
th=((.5-size)/4.5+5)*thickness_tweak
Dim sp As Double=6
Dim sp2 As Double=6
Dim pi As Double=4*Atn(1)
Dim la As Double=(line_angle *.5)
Dim ca As Double=(char_angle*.5)
sp2=sp2+30*Abs(Sin(ca*pi/180-la*pi/180))
#macro set(x1,y1,x2,y2,sarc,earc,shape,im)
rotate(px,py,x1,y1,x2,y2,sarc,earc,-char_angle,1,size,c,th*size,shape,im)
#endmacro
#macro spaces(xpixels,ypixels)
px=px+(xpixels*size+sp2*size)*Cos(line_angle*pi/180)
py=py-(ypixels*size+sp2*size)*Sin(line_angle*pi/180)
next_x=px-16*size
next_y=py-16*size
#endmacro
For n As Integer=1 To l
Select Case Mid$(s,n,1)
Case " "
spaces(30,30)
Case "|"
z=z+1
px=(x+16*size+z*16*Sin(line_angle*pi/180))+1.3*z*(24*size+size*sp*size)*Sin(line_angle*pi/180)
py=(y+z*16*Cos(line_angle*pi/180))+1.3*z*(24*size+size*sp*size)*Cos(line_angle*pi/180)
next_x=px-16*size
next_y=py-16*size
Case "1"
set(px-8,py-18,px-8,py+16,.0,.0,"line",image)'vert
set(px-8,py-16,px-12,py-8,.0,.0,"line",image)
spaces(12,12)
Case "2"
set(px-2,py-8,9,1,310,530,"circle",image)'curve
set(px-15,py+14,px+5,py-2,.0,.0,"line",image)
set(px-16,py+14,px+10,py+14,.0,.0,"line",image)'base
spaces(28,28)
Case "3"
set(px-2,py-7,9,1,300,530,"circle",image)'curve top
set(px-2,py+6,9,1,190,395,"circle",image)'curve
set(px-3,py,px+5,py,.0,.0,"line",image)
spaces(28,28)
Case "4"
set(px-16,py+4,px+12,py+4,.0,.0,"line",image)'horiz
set(px-14,py+4,px+4,py-16,.0,.0,"line",image)'slope
set(px+4,py-18,px+4,py+16,.0,.0,"line",image)
spaces(28,28)
Case "5"
set(px-14,py-16,px+6,py-16,.0,.0,"line",image)'top
set(px-12,py-16,px-12,py+1,.0,.0,"line",image)'vert
set(px-4,py+6,9,1,210,500,"circle",image)'curve
spaces(28,28)
Case "6"
set(px-2,py+6,9,1,360,360,"circle",image)'curve base
set(px+16,py+4,27,1,130,180,"circle",image)'curve edge
spaces(28,28)
Case "7"
set(px-14,py-16,px+6,py-16,.0,.0,"line",image)'top
set(px+5,py-16,px-12,py+16,.0,.0,"line",image)'slope
spaces(26,26)
Case "8"
set(px-2,py-7,9,1,320,575,"circle",image)'curve top
set(px-2,py+6,9,1,130,415,"circle",image)'curve
set(px-9,py-1,px+6,py-1,.0,.0,"line",image)
spaces(28,28)
Case "9"
set(px-2,py-6,9,1,360,360,"circle",image)'top
set(px-20,py-4,27,1,310,360,"circle",image)
spaces(28,28)
Case "0"
set(px,py-1,15,1,360,360,"circle",image)
spaces(36,36)
Case "."
set(px-12,py+12,1,1,360,360,"circle",image)
spaces(10,10)
Case "A"
set(px,py-16,px-12,py+16,.0,.0,"line",image)
set(px,py-16,px+12,py+16,.0,.0,"line",image)
set(px-8,py+3,px+8,py+3,.0,.0,"line",image)
spaces(30,30)'36
Case "a"
set(px-4,py+4,10,1,360,360,"circle",image)
set(px+6,py-8,px+6,py+16,.0,.0,"line",image)
spaces(26,26)
Case "B"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px-12,py-14,px-5,py-14,.0,.0,"line",image)'top
set(px-12,py+14,px-5,py+14,.0,.0,"line",image)'base
set(px-5,py-6,8,1,290,450,"circle",image)'top loop
set(px-5,py+6,8,1,270,430,"circle",image)'base loop
set(px-12,py,px-2,py,.0,.0,"line",image)'middle
spaces(24,24)
Case "b"
set(px-2,py+4,10,1,360,360,"circle",image)
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)
spaces(28,28)
Case "C"
set(px,py,14,1,60,300,"circle",image)
spaces(25,25)
Case "c"
set(px-4,py+4,10,1,60,300,"circle",image)
spaces(20,20)
Case "D"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)
set(px-5,py,14,1,270,450,"circle",image)
set(px-12,py-14,px-5,py-14,.0,.0,"line",image)
set(px-12,py+14,px-5,py+14,.0,.0,"line",image)
'rotate(px,py,px-24,py+20,px-24,py-20,0,0,-line_angle,1,size,rgb(255,0,0),1,"line",image)
spaces(30,30)
Case "d"
set(px-4,py+4,10,1,360,360,"circle",image)
set(px+6,py-16,px+6,py+16,.0,.0,"line",image)
spaces(26,26)
Case "E"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px-12,py-14,px+6,py-14,.0,.0,"line",image)'top
set(px-12,py+14,px+6,py+14,.0,.0,"line",image)'base
set(px-12,py,px-2,py,.0,.0,"line",image)'middle
spaces(25,25)
Case "e"
set(px-4,py+4,10,1,0,320,"circle",image)
set(px-12,py+3,px+8,py+3,.0,.0,"line",image)
spaces(26,26)
Case "F"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px-12,py-14,px+6,py-14,.0,.0,"line",image)'top
set(px-12,py,px-2,py,.0,.0,"line",image)'middle
spaces(24,24)
Case "f"
set(px-2,py-8,10,1,0,170,"circle",image)'curve
set(px-12,py-10,px-12,py+16,.0,.0,"line",image)'vert
set(px-10,py,px-2,py,.0,.0,"line",image)'middle
spaces(28,28)
Case "G"
set(px,py,14,1,50,350,"circle",image)
set(px,py,px+16,py,.0,.0,"line",image)
spaces(35,35)
Case "g"
set(px-4,py+4,10,1,360,360,"circle",image)
set(px+6,py-6,px+6,py+20,.0,.0,"line",image)
set(px-4,py+17,10,1,230,345,"circle",image)
spaces(26,26)
Case "H"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px+12,py-16,px+12,py+16,.0,.0,"line",image)'vert
set(px-12,py,px+12,py,.0,.0,"line",image)'middle
spaces(32,32)
Case "h"
'set(px-6,py+4,10,1,0,150,"circle",image)
set(px-4,py+2,8,1,0,170,"circle",image)'curve right
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)
set(px+4,py,px+4,py+16,.0,.0,"line",image)
spaces(25,25)
Case "I"
set(px,py+16,px,py-16,.0,.0,"line",image)'vert
set(px-12,py+14,px+12,py+14,.0,.0,"line",image)
set(px-12,py-14,px+12,py-14,.0,.0,"line",image)
spaces(30,30)
Case "i"
set(px-12,py-6,px-12,py+16,.0,.0,"line",image)
set(px-12,py-14,1,1,360,360,"circle",image)
spaces(10,10)
Case "J"
'set(px-2,py+4,12,1,200,270,"circle",image)
set(px-7,py+8,7,1,220,355,"circle",image)
set(px,py-16,px,py+9,.0,.0,"line",image)'vert
set(px-12,py-14,px+12,py-14,.0,.0,"line",image)'top
spaces(30,30)
Case "j"
set(px,py-6,px,py+20,.0,.0,"line",image)
set(px-7,py+20,7,1,220,360,"circle",image)
set(px,py-14,1,1,360,360,"circle",image)
spaces(22,22)
Case "K"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px+6,py-16,px-12,py,.0,.0,"line",image)'upper
set(px+6,py+16,px-6,py-3,.0,.0,"line",image)
spaces(25,25)
Case "k"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px+3,py-6,px-12,py,.0,.0,"line",image)'upper
set(px,py+16,px-8,py-3,.0,.0,"line",image)'lower
spaces(20,20)
Case "L"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px-12,py+14,px+6,py+14,.0,.0,"line",image)'base
spaces(25,25)
Case "l"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
spaces(10,10)
Case "M"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px+12,py-16,px+12,py+16,.0,.0,"line",image)'vert
set(px-12,py-16,px,py,.0,.0,"line",image)'left arm
set(px+12,py-16,px,py,.0,.0,"line",image)'right arm
spaces(32,32)
Case "m"
set(px-6,py+2,6,1,0,170,"circle",image)'curve left
set(px+6,py+2,6,1,0,170,"circle",image)'curve right
set(px-12,py-5,px-12,py+16,.0,.0,"line",image)'vert left
set(px+12,py,px+12,py+16,.0,.0,"line",image)'vert right
set(px,py+16,px,py,.0,.0,"line",image)'mid arm
spaces(32,32)
Case "N"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px+12,py-16,px+12,py+16,.0,.0,"line",image)'vert
set(px-12,py-16,px+12,py+16,.0,.0,"line",image)'middle
spaces(32,32)
Case "n"
set(px-4,py+2,8,1,0,170,"circle",image)'curve right
set(px-12,py-5,px-12,py+16,.0,.0,"line",image)'vert left
set(px+4,py+16,px+4,py,.0,.0,"line",image)'mid arm
spaces(24,24)
Case "O"
set(px,py,14,1,360,360,"circle",image)
spaces(36,36)
Case "o"
set(px-4,py+4,10,1,360,360,"circle",image)
'set(px+6,py-16,px+6,py+16,.0,.0,"line",image)
spaces(26,26)
Case "P"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px-12,py-14,px-5,py-14,.0,.0,"line",image)'top
'set(px-12,py+14,px-5,py+14,.0,.0,"line",image)'base
set(px-5,py-6,8,1,280,450,"circle",image)'top loop
'set(px-5,py+6,10,1,270,430,"circle",image)'base loop
set(px-12,py+2,px-2,py+2,.0,.0,"line",image)'middle
spaces(24,24)
Case "p"
set(px-5,py+4,10,1,270,435,"circle",image)' loop
set(px-14,py-5,px-2,py-5,.0,.0,"line",image)'top
set(px-12,py+14,px-5,py+14,.0,.0,"line",image)'base
set(px-12,py-6,px-12,py+26,.0,.0,"line",image)'vert
spaces(24,24)
Case "Q"
set(px,py,14,1,360,360,"circle",image)
set(px+5,py+20,16,1,400,460,"circle",image)
spaces(36,36)
Case "q"
set(px-5,py+6,10,1,110,270,"circle",image)' loop
set(px-9,py-3,px+2,py-3,.0,.0,"line",image)'top
set(px-8,py+16,px,py+16,.0,.0,"line",image)'base
set(px,py-3,px,py+26,.0,.0,"line",image)'vert
spaces(20,20)
Case "R"
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px-12,py-14,px-5,py-14,.0,.0,"line",image)'top
'set(px-12,py+14,px-5,py+14,.0,.0,"line",image)'base
set(px-5,py-6,8,1,290,450,"circle",image)'top loop
'set(px-5,py+6,10,1,270,430,"circle",image)'base loop
set(px-12,py+2,px-2,py+2,.0,.0,"line",image)'middle
set(px-8-1+3,py+1,px+12-8-1,py+16+1-2,.0,.0,"line",image)'slope
spaces(24,24)
Case "r"
set(px-4,py+4,10,1,30,130,"circle",image)
set(px-12,py-8,px-12,py+16,.0,.0,"line",image)
spaces(24,24)
Case "S"
set(px-2,py-7,8,1,20,240,"circle",image)'curve top
set(px-2,py+6,8,1,200,500,"circle",image)'curve
'set(px-9,py-1,px+6,py-1,.0,.0,"line",image)
spaces(26,26)
Case "s"
set(px-4,py+4,10,1,40,140,"circle",image)'top
set(px-1,py-4,10,1,180,240,"circle",image)'topslant
set(px-6,py+14,10,1,20,100,"circle",image)'baseslant
set(px-4,py+4,10,1,220,325,"circle",image)'base
'set(px-12,py-4,px+2,py+12,.0,.0,"line",image)
'set(px+6,py-8,px+6,py+16,.0,.0,"line",image)
spaces(26,26)
Case "T"
set(px,py-12,px,py+16,.0,.0,"line",image)'vert
set(px-16,py-12-2,px+16,py-12-2,.0,.0,"line",image)
spaces(34,34)
Case "t"
set(px-12,py-16,px-12,py+10,.0,.0,"line",image)'edge
set(px-12,py-4,px-2,py-4,.0,.0,"line",image)
set(px-4,py+4,10,1,210,320,"circle",image)
spaces (24,24)
Case "U"
set(px-12,py-16,px-12,py+8,.0,.0,"line",image)'vert
set(px+12,py-16,px+12,py+8,.0,.0,"line",image)'vert
set(px,py,14,1,205,335,"circle",image)
'set(px-12,py,px+12,py,.0,.0,"line",image)'middle
spaces(33,33)
Case "u"
set(px-4,py+4,10,1,210,360,"circle",image)
set(px+6,py-6,px+6,py+16,.0,.0,"line",image)
set(px-12,py-6,px-12,py+10,.0,.0,"line",image)'left edge
spaces(26,26)
Case "V"
set(px,py+16,px-12,py-16,.0,.0,"line",image)
set(px,py+16,px+12,py-16,.0,.0,"line",image)
'set(px-8,py+3,px+8,py+3,.0,.0,"line",image)
spaces(32,32)'36
Case "v"
set(px-12,py-6,px-4,py+16,.0,.0,"line",image)'left
set(px-4,py+16,px+4,py-6,.0,.0,"line",image)
spaces(24,24)
Case "W"
set(px-12,py-16,px-8,py+16,.0,.0,"line",image)'vert left
set(px+12,py-16,px+8,py+16,.0,.0,"line",image)'vert
set(px-8,py+16,px,py,.0,.0,"line",image)'left arm
set(px+8,py+16,px,py,.0,.0,"line",image)'right arm
spaces(32,32)
Case "w"
set(px-14,py-6,px-8,py+16,.0,.0,"line",image)'vert left
set(px+8,py+16,px+12,py-6,.0,.0,"line",image)'vert right
set(px-8,py+16,px,py,.0,.0,"line",image)'left arm
set(px+8,py+16,px,py,.0,.0,"line",image)'right arm
spaces(33,33)
Case "X"
set(px-12,py-16,px+12,py+16,.0,.0,"line",image)
set(px+12,py-16,px-12,py+16,.0,.0,"line",image)
spaces(32,32)
Case "x"
set(px-12,py-6,px+2,py+16,.0,.0,"line",image)
set(px+2,py-6,px-12,py+16,.0,.0,"line",image)
spaces(22,22)
Case "Y"
set(px-12,py-16,px,py,.0,.0,"line",image)
set(px+12,py-16,px,py,.0,.0,"line",image)
set(px,py,px,py+16,.0,.0,"line",image)
spaces(32,32)
Case "y"
set(px-4,py+4,8,1,180,380,"circle",image)'top
set(px+4,py-6,px+4,py+20,.0,.0,"line",image)'right
set(px-6,py+17,10,1,230,345,"circle",image)'base
set(px-12,py-6,px-12,py+4,.0,.0,"line",image)'left
spaces(24,24)
Case "Z"
set(px-12,py-14,px+12,py-14,.0,.0,"line",image)'top
set(px-12,py+14,px+12,py+14,.0,.0,"line",image)
set(px+10,py-14,px-10,py+14,.0,.0,"line",image)'slope
spaces(30,30)
Case "z"
set(px-16,py-4,px+2,py-4,.0,.0,"line",image)'top
set(px-16,py+14,px+2,py+14,.0,.0,"line",image)'base
set(px+1,py-5,px-14,py+14,.0,.0,"line",image)'slope
spaces(20,20)
'************************************************
Case ","
set(px-12,py+12,px-18,py+20,.0,.0,"line",image)
set(px-12,py+12,1,1,360,360,"circle",image)
spaces(10,10)
Case"£"
set(px-5,py-5,8,1,40,220,"circle",image)'top
set(px-19-5-5,py+10-5,18,1,320,390,"circle",image)
set(px-16,py+16,px+8,py+16,.0,.0,"line",image)'base
set(px-16,py+2,px,py+2,.0,.0,"line",image)
spaces(28,28)
Case "$"
set(px-2,py-7,8,1,20,240,"circle",image)'curve top
set(px-2,py+6,8,1,200,495,"circle",image)'curve
set(px-2,py-17,px-2,py+17,.0,.0,"line",image)
'set(px-9,py-1,px+6,py-1,.0,.0,"line",image)
spaces(26,26)
Case "%"
set(px-10,py-10,6,1,360,360,"circle",image)
set(px+10,py+10,6,1,360,360,"circle",image)
set(px+8,py-8,px-8,py+8,.0,.0,"line",image)
spaces(33,33)
Case "^"
set(px-14,py,px-7,py-16,.0,.0,"line",image)
set(px-7,py-16,px,py,.0,.0,"line",image)
spaces(20,20)
Case"&"
set(px-2,py-7,8,1,70,220,"circle",image)'curve top
set(px-2,py+6,8,1,110,415,"circle",image)'curve
set(px-4-4-2,py-8,px+12-4,py+16,.0,.0,"line",image)
'set(px-9,py-1,px+6,py-1,.0,.0,"line",image)
spaces(28,28)
Case "*"
set(px-12,py-6-8,px+2,py+16-8,.0,.0,"line",image)
set(px+2,py-6-8,px-12,py+16-8,.0,.0,"line",image)
set(px-16,py-3,px+6,py-3,.0,.0,"line",image)
spaces(24,24)
Case "("
set(px+22,py,38,1,150,210,"circle",image)
spaces(12,12)
Case ")"
set(px-22-16-6,py,38,1,330,390,"circle",image)
spaces(12,12)
Case "-"
set(px-16,py,px+8,py,.0,.0,"line",image)
spaces(26,26)
Case "_"
set(px-16,py+16,px+16,py+16,.0,.0,"line",image)
spaces(34,34)
Case "+"
set(px-16,py,px+8,py,.0,.0,"line",image)
set(px-4,py+12,px-4,py-12,.0,.0,"line",image)
spaces(26,26)
Case "="
set(px-16,py-4,px+8,py-4,.0,.0,"line",image)
set(px-16,py+4,px+8,py+4,.0,.0,"line",image)
spaces(26,26)
Case "!"
set(px-12,py-16,px-12,py+6,.0,.0,"line",image)
set(px-12,py+12,1,1,360,360,"circle",image)
spaces(10,10)
Case "¬"
set(px-16,py+4,px+8,py+4,.0,.0,"line",image)
set(px+6,py+4,px+6,py+12,.0,.0,"line",image)
spaces(26,26)
Case "`"
set(px-16,py-16,px-12,py-12,.0,.0,"line",image)
spaces(8,8)
Case ";"
set(px-12,py-4,1,1,360,360,"circle",image)'top
set(px-12,py+12,px-18,py+20,.0,.0,"line",image)
set(px-12,py+12,1,1,360,360,"circle",image)
spaces(10,10)
Case ":"
set(px-12,py-4,1,1,360,360,"circle",image)'top
'set(px-12,py+12,px-18,py+20,.0,.0,"line",image)
set(px-12,py+12,1,1,360,360,"circle",image)
spaces(10,10)
Case "@"
set(px,py,14,1,0,290,"circle",image)
set(px+6,py,7,1,100,365,"circle",image)
spaces(36,36)
Case "'"
set(px-12,py-12,px-18,py-4,.0,.0,"line",image)
set(px-12,py-12,1,1,360,360,"circle",image)
spaces(10,10)
Case "#"
set(px-16,py-4,px+8,py-4,.0,.0,"line",image)
set(px-16,py+4,px+8,py+4,.0,.0,"line",image)
set(px-8,py-12,px-8,py+12,.0,.0,"line",image)
set(px,py-12,px,py+12,.0,.0,"line",image)
spaces(26,26)
Case "~"
set(px-8,py+16,14,1,60,120,"circle",image)
set(px+4,py-8,14,1,240,300,"circle",image)
spaces(30,30)
Case "/"
set(px+14,py-16,px-14,py+16,.0,.0,"line",image)
spaces(34,34)
Case ""
set(px-14,py-16,px+14,py+16,.0,.0,"line",image)
spaces(34,34)
Case "["
set(px-12,py-16,px-12,py+16,.0,.0,"line",image)'vert
set(px-12,py-14,px-4,py-14,.0,.0,"line",image)'top
set(px-12,py+14,px-4,py+14,.0,.0,"line",image)
spaces(14,14)
Case "]"
set(px-4,py-16,px-4,py+16,.0,.0,"line",image)'vert
set(px-4,py-14,px-12,py-14,.0,.0,"line",image)'top
set(px-12,py+14,px-4,py+14,.0,.0,"line",image)
spaces(16,16)
Case "{"
set(px+12,py-8,28,1,160,200,"circle",image)
set(px+12,py+8,28,1,160,200,"circle",image)
spaces(8,8)
Case "}"
set(px-12-16-6,py-8,28,1,340,380,"circle",image)
set(px-12-16-6,py+8,28,1,340,380,"circle",image)
spaces(14,14)
Case "<"
set(px-16,py,px+4,py-12,.0,.0,"line",image)
set(px-16,py,px+4,py+12,.0,.0,"line",image)
spaces(24,24)
Case ">"
set(px+4,py,px-16,py-12,.0,.0,"line",image)
set(px+4,py,px-16,py+12,.0,.0,"line",image)
spaces(24,24)
Case "?"
set(px-5,py-6,8,1,280,490,"circle",image)'top loop
set(px-4,py,px-4,py+8,.0,.0,"line",image)
set(px-4,py+15,1,1,360,360,"circle",image)
spaces(24,24)
Case """"
set(px-12,py-16,px-18,py-8,.0,.0,"line",image)
set(px-12,py-16,1,1,360,360,"circle",image)
set(px-4,py-16,px-10,py-8,.0,.0,"line",image)
set(px-4,py-16,1,1,360,360,"circle",image)
spaces(16,16)
Case Else
Draw String(px,py),"?",c
spaces(24,24)
End Select
Next n
End Sub
'************************* END OF PAINTSTRING ******************************
'***************************************************************************
'***************************************************************************
'THE FOLLOWING CODE IS FOR THE EXAMPLES
'EXAMPLE SUB -- WRITE TO AN IMAGE
Sub make_draw_image
Dim x As Integer =900
Dim y As Integer =600
Dim im As Any Pointer
screenres x,y,32
'exit sub
im=imagecreate(5*x,y)
Paint (0,0),rgb(133,70,9)
paintstring(255,100,"Please wait",1,rgb(0,200,0))
paintstring(0,400,"LOADING : ",1,rgb(100,130,250))
'*** MAKE A SKY LIKE BACKGROUND
Dim As Integer r,b,g,r1,b1,g1,r2,b2,g2',x2
x=4500
r1=99
g1=127
b1=192
r2=170
g2=201
b2=241
For row As Double=0 To y Step .5
r=(r2-r1)*row/y+r1
b=(b2-b1)*row/y+b1
g=(g2-g1)*row/y+g1
Line im,(0,row)-(x,row),rgb(r,g,b)
Next row
'**********************************
'MAKE A SLOPE AND SOME TREES
Dim As Double valpv,valpg,valrr,g0
#macro pv(x)
valpv= 450-7.1e-2*x+2.5e-5*x^2
#endmacro
#macro pg(x)
valpg=-7.1e-2+2*2.5e-5*x
#endmacro
#macro rr(l,u)
valrr = Rnd * (u - l) + l
#endmacro
'THE SLOPE TO IMAGE
For n As Double=0 To 4640 Step .5
pv(n)
pg(n)
g0=-50*valpg
Line im,(n,y)-(n,valpv),rgb(0,149-g0,0)
Next n
'THE TREES TO IMAGE
For m As Double=0 To 150 Step 10
paintstring(next_x,next_y,"-",1,rgb(255,0,0))
Randomize m
rr(3,9)
For n As Double=125 To 4640 Step valrr
Randomize n^2
Dim As Double l,k,pivx,pivy,pivz,g0,shader
Dim As Uinteger treecol
rr(2,11)
l=valrr
rr(1,5)
k=valrr
pivx=n
pv(n)
pivy=valpv+k+m
pivz=0
pg(n)
g0=-50*valpg
rr(-2,2)
Line im,(pivx,pivy)-(pivx+valrr,pivy+8),rgb(144-g0,35-g0,37)
rr(1,40)
Dim cc As Double=valrr
For a As Double=90 To 450 Step 7
Randomize a
rr(2,4)
shader=-valrr
r=20+shader+cc
g=130-g0+shader:If g>40 Then g=g-40
b=20+shader:If b>20 Then b=b-20
treecol=rgb(r,g,b)
For a2 As Double=0 To l Step .3
If a>270 Then shader=-shader
treecol=rgb(r,g-a2*shader,b)
rotate(pivx,pivy,pivx-a2,pivy,pivx-1,pivy,.0,.0,a,1,1,treecol,1,"line",im)
Next a2
Next a
Next n
Next m
'DRAW CHARACTERS TO IMAGE
Dim sz As Double=1.94 'character size
'to add some dimension to the characters
'where t = thickness,
For t As Double=1.2 To .1 Step -.1
Dim cc As Double=90*t
paintstring(0,200,"Will Scarlet, ",sz,rgb(200-cc,0,0),,,t,im)
'Use continue x and y to change colours for each name
paintstring(next_x,next_y,"Little John, ",sz,rgb(0,0,200-cc),,,t,im)
paintstring(next_x,next_y,"Friar Tuck, ",sz,rgb(200-cc,200-cc,200-cc),,,t,im)
paintstring(next_x,next_y,"Maid Marion, ",sz,rgb(250-cc,180-cc,200-cc),,,t,im)
paintstring(next_x,next_y,"Robin Hood ",sz,rgb(0,150-cc,0),,,t,im)
paintstring(next_x,next_y,"and ",sz,rgb(130-cc,130-cc,130-cc),,,t,im)
paintstring(next_x,next_y,"Gamble Gold.|",sz,rgb(200-cc,200-cc,130-cc),,,t,im)
Next t
'RUN IMAGE
Dim As Integer z1,z2
For z1=0 To -3740 Step -1
Put (z1,z2),im,Pset
Next z1
paintstring(50,next_y+100,"press a key to move on",1,rgb(0,100,0))
Sleep
imagedestroy(im)
End Sub
'EXAMPLE SUB -- USAGE OF PAINTSTRING
Sub usage
screenres 1000,600,32
paintstring(10,20,"Thank you for trying paintstring.",1,RGB(255,254,253))
Dim As String s
s="A bit like Draw String, with parameters.|"
paintstring(10,90,s,.8,rgb(255,254,253))
s="There are 9 parameters as follows:|Parameter 1 - start x position|"
paintstring(next_x,next_y,s,.7,rgb(255,254,253))
s="Parameter 2 - start y position|Parameter 3 - The string to paint|Parameter 4 - Size|"
paintstring(next_x,next_y,s,.7,rgb(255,254,253))
s="Parameter 5 - Colour (RGB form)|Parameter 6 - Angle of text from horizontal|"
paintstring(next_x,next_y,s,.7,rgb(255,254,253))
s="Parameter 7 - Character angle from horizontal|"
paintstring(next_x,next_y,s,.7,rgb(255,254,253))
s="Parameter 8 - Tweak the thickness to suit|"
paintstring(next_x,next_y,s,.7,rgb(255,254,253))
s="Parameter 9 - Write to an image|"
paintstring(next_x,next_y,s,.7,rgb(255,254,253))
s="Press a key to continue|"
paintstring(next_x,next_y+10,s,.7,rgb(155,0,0))
Sleep
Cls
'________________________________SIZES
s="This starts at position 0,0|Size = 1|"
paintstring(0,0,s,1,rgb(0,155,0))
s="The characters available are from a British|keyboard|"
paintstring(next_x,next_y,s,.7,rgb(0,155,0))
s="All the characters are available except the pipe|"
paintstring(next_x,next_y,s,.7,rgb(155,0,0))
s="The pipe is used for a new line.|"
paintstring(next_x,next_y,s,.7,rgb(155,0,0))
s="ANGLES:|"
paintstring(next_x,next_y,s,.7,rgb(155,0,0))
s="Line angle=-15, character angle=-15, size=.7"
paintstring(next_x,next_y,s,.7,rgb(155,0,0),-15,-15)
s="Press a key to continue|"
paintstring(0,next_y,s,.7,rgb(155,100,100))
Sleep
Cls
'___________________________________THIRTY DEGREES
s="LINE MINUS THIRTY DEGREES | CHARACTER ZERO DEGREES| SIZE ONE|"
paintstring(0,0,s,1,rgb(155,200,0),-30,0)
s="Press a key to continue|"
paintstring(0,550,s,1,rgb(0,0,155))
Sleep
Cls
'__________________________________NUMBERS
s="Size = .5 (about the smallest for paintstring)|"
paintstring(10,10,s,.5,rgb(155,0,200))
s="Size = .75|"
paintstring(next_x,next_y,s,.75,rgb(155,0,200))
s="Size = 1.5|"
paintstring(next_x,next_y,s,1.5,rgb(155,0,200))
s="Size = 2|"
paintstring(next_x,next_y,s,2,rgb(155,0,200))
s="Size = 3|"
paintstring(next_x,next_y,s,3,rgb(155,0,200))
s="Size = 3.1|"
paintstring(next_x,next_y,s,3.1,rgb(155,0,200))
s="Press a key to continue|"
paintstring(10,580,s,.5,rgb(155,200,255))
Sleep
Cls
s="Some numbers:|"
paintstring(10,10,s,.6,rgb(155,0,0))
s=""
For x As Double=-1 To 9
s=s+"SQR("+Str$(x)+") = "+Str$(Sqr(x))+"|"
paintstring(10,50,s,.7,rgb(254,254,254))
Next x
s="Press a key to continue|"
paintstring(10,580,s,.5,rgb(155,200,255))
Sleep
Cls
'_____________________________________IMAGE
s="Now put characters to an image.|The characters load quickly|but I have some background|"
paintstring(10,50,s,.7,rgb(254,254,254))
s="So please be patient while everything loads.|"
paintstring(next_x,next_y,s,.7,rgb(254,254,254))
s="Press a key to continue|"
paintstring(10,580,s,.5,rgb(155,200,255))
Sleep
Cls
make_draw_image
Cls
'___________________________________________TIPS
s="The character sizes are independent of|screen resolutions. Size 1 is always|32*32 pixels.|"
paintstring(10,10,s,.7,rgb(253,185,11),,,1)
s="The shared doubles next_x and next_y|will position the next paintstring call|logically.|"
paintstring(next_x,next_y,s,.7,rgb(253,18,111),,,1)
s="The rotate sub with the shared array|np(1 to 4) can stand alone.|"
paintstring(next_x,next_y,s,.7,rgb(253,185,211),,,1)
s="Don't use pure brilliant white.|It is used as a primer in the painting|macro.|"
paintstring(next_x,next_y,s,.7,rgb(253,185,11),,,1)
s="Reduce it a digit or two|"
paintstring(next_x,next_y,s,.7,rgb(253,185,11),,,1)
s="e.g. RGB(255,255,254)|"
paintstring(next_x,next_y,s,.7,rgb(255,255,254),,,1)
s="NOW INCORPORATE A BIT OF MOTION :-"
paintstring(next_x,next_y,s,.7,rgb(253,0,211),,,1)
s="Press a key to continue|"
paintstring(10,580,s,.5,rgb(155,200,255))
Sleep
'______________________________EARTH,AIR,FIRE,WATER
Dim As Uinteger col,count
For n As Double =.6 To 2.2 Step .005
count=count+1
If count Mod 2=0 Then
col=rgb(255,0,0)
Else
col=rgb(255,255-100*n,0)
End If
screenlock
Cls
paintstring(100*n-50,100*n+50,"Fire Burns|",n,col,10*n,10*n)
paintstring(next_x,next_y,"Earth Turns|",.8*n,rgb(154,90,8),10*n,10*n)
paintstring(next_x-80*(n-.6),next_y+30*(n-.6),"Water Flows|",.7*n,rgb(130,160,250),10*n,-10*n/10)
paintstring(next_x+80*(n-.6),next_y-30*(n-.6),"Wind Blows|",.6*n,rgba(200,200,200,50),10*n,300*n/10)
screenunlock
Sleep 1,1
Next n
s="Press a key to continue|"
paintstring(400,580,s,.5,rgb(155,200,255))
Sleep
Cls
'_______________________________________SHIFT
Dim As Double sx=32,sy=0,stx=100,sty=50,svx,hvx,ivx,fvx,tvx,svy,hvy,ivy,fvy,tvy
For a As Double=0 To 360 Step .5
svx=3.333333333333334*a-9.259259259259261e-003*a*a'ok
svy=-0.1114551083591331*a+3.095975232198143e-004*a*a'ok
hvx=-1.168831168831169*a+3.246753246753247e-003*a*a'ok
hvy=-1.111111111111111*a+3.08641975308642e-003*a*a'oh
ivx=4.800000000000001*a-1.333333333333334e-002*a*a'ok
ivy=2.408026755852843*a-6.688963210702342e-003*a*a'ok
fvx=0.2*a -5.555555555555557e-004*a*a'ok
fvy=-0.5555555555555556*a+1.54320987654321e-003*a*a'ok
tvx= -3.636363636363638*a+1.010101010101011e-002*a*a'redo
tvy= (-5.14285714285715*a+1.42857142857143e-002*a*a)/10'ok
screenlock
Cls
paintstring(stx+a+svx,sty+sy+a+svy,"S",1,rgb(255,254,255),0,2*a)
paintstring(stx+sx+a+hvx,sty+sy+a+hvy,"H",1,rgb(255,254,255),0,8*a)
paintstring(stx+2*sx+a+ivx,sty+sy+a+ivy,"I",1,rgb(255,254,255),0,30*a)
paintstring(stx+3*sx+a+fvx,sty+sy+a+fvy,"F",1,rgb(255,254,255),0,-6*a)
paintstring(stx+4*sx+a+tvx,sty+sy+a+tvy,"T",1,rgb(255,254,255),0,-20*a)
screenunlock
Sleep 1,1
If a=0 Then
paintstring(300,50,"Translaion?",.7,rgb(200,200,100))
Sleep 1000
End If
Next a
s="Press a key to continue|"
paintstring(400,580,s,.5,rgb(155,200,255))
Sleep
Cls
'__________________________________CHRISTMAS
Paint(0,0),rgb(0,207,255)
For n As Double=.9 To 1 Step .01
If n<1 Then
col=rgb(255,254,254)
Else
col=rgb(255,0,0)
End If
If n<=.902 Then col=rgb(0,0,0)
paintstring(20+50*n,50+50*n,"MERRY CHRISTMAS|",1.5,col,,n)
paintstring(50+50*n,150+50*n,"(In a couple of weeks)",.9,col,,n)
Next n
s="Press a key to continue|"
paintstring(400,580,s,.5,rgb(155,200,255))
Sleep
'______________________________________DIMENSION
s="Add some|DIMENSION|to the letters"
Dim num As Integer
num=190
Paint (0,0),rgb(240,240,240)
For n As Double=1.3 To 0 Step -.1
paintstring(20,20,s,2,rgb(255-num*n,254-num*n,253-num*n),,,n)
Next n
s="Press a key to continue|"
paintstring(10,580,s,.5,rgb(0,0,0))
Sleep
Cls
'______________________________________APPENDIX
s="APPENDIX:|"
paintstring(0,0,s,.6,rgb(255,255,254))
s="To add a character: use a 32*32 grid with centre|px=0,py=0|"
paintstring(next_x,next_y,s,.6,rgb(255,255,254))
s="use the set macro with another selected case|"
paintstring(next_x,next_y,s,.6,rgb(255,255,254))
s="Put left edge of character to left of grid|"
paintstring(next_x,next_y,s,.6,rgb(255,255,254))
s="Plot the line-ends and circle-centres + radius|"
paintstring(next_x,next_y,s,.6,rgb(255,255,254))
s="Go to case D, uncomment the rotate call|"
paintstring(next_x,next_y,s,.6,rgb(255,255,254))
s="Adjust spaces(*,*) to butt against the line|"
paintstring(next_x,next_y,s,.6,rgb(255,255,254))
s="Thank you for running this code!|"
paintstring(next_x,next_y+50,s,.75,rgb(255,255,154))
s="Well I didn't include a get out option|Ha Ha|"
paintstring(next_x,next_y,s,.75,rgb(255,255,154))
s="Hope you found it entertaining|"
paintstring(next_x,next_y,s,.75,rgb(255,255,154))
s="AND UTTERLY USELESS|"
paintstring(next_x,next_y,s,.75,rgb(155,255,254))
s="Press a key to move on|"
paintstring(next_x,next_y,s,.5,rgb(255,254,253))
Sleep
Cls
'________________________________________GOODBYE
Paint(0,0),rgb(153,80,245)
s="GOODBYE"
For n As Double=1.3 To 0 Step -.1
paintstring(20,100,s,2,rgb(0,254-num*n,253-num*n),,-5,n)
Next n
s="Good luck!|"
For n As Double=1.3 To 0 Step -.1
paintstring(20,300,s,2,rgb(255-num*n,254-num*n,0),,5,n)
Next n
s="Press a key to end|"
paintstring(10,580,s,.5,rgb(0,0,0))
Sleep
Cls
End Sub
usage