home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 20
/
AACD20.BIN
/
AACD
/
Graphics
/
PerfectPaint
/
rexx
/
text
/
Circle_Text_new.rx
< prev
next >
Wrap
Text File
|
2000-11-08
|
2KB
|
128 lines
/*
Arexx Text Script
modificated by Antibike 07.11.2000
*/
call addlib("rexxmathlib.library", 5, -30, 0)
options results
parse ARG Port x1 y1 b
ADDRESS value Port
Pi=3.1415926/180
pp_AvoidRefresh
r=100
c=0
startw=180
usew=360
pp_DialogInit 230 116 "*Circle*Text*" 4
pp_Integer 0 80 5 50 16 "Radius" 1 r
pp_Cycle 1 80 25 60 16 "Turn" 1 "right|left" c
pp_slider 2 80 45 100 16 "Startwinkel" 1 0 360 startW
pp_slider 3 80 65 100 16 "Usewinkel" 1 0 360 useW
pp_Dialog
rc=result
if rc=0 then
do
pp_PermitRefresh
EXIT
end
pp_UpdateUndo
pp_GetText
texte=result
pp_GetDialog 0
r=result
pp_GetDialog 1
c=result
pp_GetDialog 2
startW=result
pp_GetDialog 3
useW=result
if c=1 then DO
endW=startW+useW
s0=length(texte)
p=s0
if useW<359 then DO
p=s0-1
end
a=useW/p
if useW<359 then DO
endW=endW+a
end
j=1
DO i=startW To endW by a*+1
x = trunc(Sin(i*Pi)*r+x1+0.5,0)
y = trunc(Cos(i*Pi)*r+y1+0.5,0)
t=substr(texte,j,1)
if t~=" " then DO
pp_TextRotate i
pp_TextMake t
pp_TextDraw x y
end
j=j+1
END
end
if c=0 then DO
endW=startW-useW
s0=length(texte)
p=s0
if useW<359 then DO
p=s0-1
end
a=useW/p
if useW<359 then DO
endW=endW-a
end
j=1
DO i=startW To endW by a*-1
x = trunc(Sin(i*Pi)*r+x1+0.5,0)
y = trunc(Cos(i*Pi)*r+y1+0.5,0)
t=substr(texte,j,1)
if t~=" " then DO
pp_TextRotate i+180
pp_TextMake t
pp_TextDraw x y
end
j=j+1
END
end
pp_Refresh
pp_TextRestore
pp_TextMake
pp_PermitRefresh