GraphicsWindow.PenColor="#00ccbb
For x=0 To 70
GraphicsWindow.DrawLine(x*20,0,x*20,800)
EndFor
For x=0 To 40
GraphicsWindow.DrawLine(0,x*20,1700,x*20)
EndFor
deffch()
GraphicsWindow.PenWidth=3
'c1=LDDialogs.Colour()
args=0
sc=0
t_x=30
t_y=190
Bang =75'default angle for 0 gr. chars
dang=0
t_Angle =dang+Bang
cc=""
txx0="europe;TILT..... i-bcefghijklmnopxlorem.ipsum.dolor.sit.ament.quick.brown.fox.jumps.over'lazydog"
'"EXPO2015;MILANO#fiORi;1_5_._1_1Q_2Q15_"
txx0=text.ConvertToUpperCase (txx0)
For z=0 to 3
GraphicsWindow.Clear ()
dang=0
t_Angle =dang+Bang
t_x=30+z*100
t_y=190
ca=z*3
lll=0
txx= Text.GetSubTextToEnd (txx0,1)
lnn=15
drtxt()
Program.Delay(3333)
endfor
Sub drtxt
For ff=1 To lnn
cc= Text.GetSubText (txx,ff,1)
If cc="." then
ctx=90
cty=0
ctpos()
ElseIf cc=";" then
lll=lll+1
t_x=30+z*100-z*20
t_y=lll*180+190
Turtle.x=t_x
Turtle.y=t_y
Turtle.Angle=0
If ca<>0 then
isp=isp/2
endif
t_Angle=bang
dang=0
oa=0
'Dialogs.ShowMessageBox("nl","","OK","")
else
pmm=0
mi=0
LDCall.Function ("drwch",ca)
if flmd=1 then
pshw()
endif
endif
endfor
EndSub
Sub recdd
ni=2
For xx=rs To 2 Step -1
ns[ni]=td[xx]
ni=ni+1
endfor
For xx=Array.GetItemCount(td) To rs+1 Step -1
ns[ni]=td[xx]
ni=ni+1
endfor
For xx=2 To ni-1
If text.StartsWith (ns[xx],"a") or text.StartsWith (ns[xx],"b") Then
if Text.IsSubText(ns[xx],"r") then
LDText.Replace(ns[xx],"r","l")
Else
LDText.Replace(ns[xx],"l","r")
endif
endif
td[xx]=ns[xx]
endfor
td[1]="0"
EndSub
Sub drwch '------------------------------draws chars
spa=args[1]
dang=dang+spa
oa=dang
ox=t_x
oy=t_y
spp=0
nn=LDText.Split(spd[cc][2]+";0",";")
ctx=nn[2]
cty=nn[1]
ctpos ()
stx=def[cc]
If Text.IsSubText(stx,"%") Then
rr=text.GetSubText(stx,text.GetIndexOf(stx,"%")+1,1)
stx=LDText.Replace(stx,"%"+rr,def[rr])
endif
' TextWindow.WriteLine (stx)
td=ldtext.Split(stx,"|")
t_pendown ()
vmir=0
For xi=1 to Array.GetItemCount (td)
If td[xi]="vm1" then
vmir=1
t_angle=t_angle-math.Round (dang*6/4)
Goto xx
elseIf text.StartsWith (td[xi],"#c") then
rs=text.GetSubTextToEnd (td[1],3)
recdd()
else
cm=par[td[xi]]
tw=ldtext.Split(cm,";")
dd=tw[1]
If tw[2]=0 Then
t_Angle =t_Angle +dd
else
LDCall.Function ("sewto",tw[2])
endif
endif
xx:
endfor
t_penup ()
spp=spd[cc][1]
t_Angle = oa
Turtle.Angle =dang+90-spa
Turtle.x=ox
Turtle.y=oy
For x=1 To math.Abs(fff)
If ii<6 Then
t_PenUp ()
Else
t_PenDown ()
endif
GraphicsWindow.PenColor=LDColours.HSLtoRGB(sc,1,0.8)
sc=sc+2
ldcall.function("t_Move",10)
ldcall.function("t_Turn",-180+aa+dd)
GraphicsWindow.PenColor="Black
ldcall.function("t_Move",ii)
ldcall.function("t_Turn",180-aa)
If sm then
ii=ii+ss
If Math.Remainder(x,2)=0 Then
ii=ii+ss/3
endif
If (ss<0) And (ii<1) Then
ss=-ss
ii=1
endif
If (ss>0 And ii>10) Then
ss=-ss
ii=10
endif
endif
endfor
EndSub
Sub t_Turn
t_Angle =t_Angle +args[1]
EndSub
sub t_Move
ds=args[1]
mm=LDMath.Convert2Cartesian (t_x,t_y,ds, t_Angle-90 )
If penn then
If vmir=1 Then
GraphicsWindow.DrawLine (math.Round(t_x),ymr-math.Round(t_y),math.Round (mm[1]),ymr-math.Round (mm[2]))
Else
GraphicsWindow.DrawLine (math.Round(t_x),math.Round(t_y),math.Round (mm[1]),math.Round (mm[2]))
endif
t_x= (mm[1])
t_y= (mm[2])
mi=mi+1
pmm[mi][1]=t_x
If vmir=1 Then
pmm[mi][2]=ymr - t_y
Else
pmm[mi][2]= t_y
EndIf
endif
EndSub
Sub t_TurnRight
t_Angle =t_Angle +90
EndSub
Sub t_Tureft
t_Angle =t_Angle -90
EndSub
Sub t_pendown
penn="True
EndSub
Sub t_penup
penn="Fale
EndSub
Sub pshw
rc1= LDColours.HSLtoRGB(Math.GetRandomNumber(60),1,0.8)
bcc= LDText.Split(Rc1+" Yellow Orange"," ")
bgp= LDShapes.BrushGradient (bcc,"DD")
If flmd=1 then
LDShapes.BrushGradientPolygon(bgp,pmm)
endif
EndSub
Sub deffch
par["a90r"]="15;6"
par["a180r"]="30;6"
par["b90r"]="9;10"
par["b180r"]="18;10