|
Post by BeeTrap on Mar 28, 2019 14:46:19 GMT -5
This is similar to what you "May" want. This is from Dan Teel on the ConForums on June 8, 2015.
nomainwin WindowWidth = 750 WindowHeight = 650 UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2)
graphicbox #main.g, 0, 0, 750, 650
open "Rotated text" for window_nf as #main print #main.g, "down; fill black; flush" print #main, "font ms_sans_serif 10" print #main, "trapclose [quit.main]"
for k = 4 to 2 step -2 abc$=" abcdefghijklmnopqrstuvwxyz" for i = 0 to .1745 step .1745 for ang=0 to 6.28 step .349 calldll #kernel32,"Sleep",1 as long,ret as void scan a=not(a) if a then abc$=lower$(abc$) else abc$=upper$(abc$) call drawNumbers abc$,325,250,ang+i,18,k,int(rnd(1)*16777215) abc$=left$(abc$,len(abc$)-1) next ang abc$=" 123456.78901234560" next i next k for i = 0 to 6.28 step .6 call drawNumbers " DONE",325,250,i,30,20,int(rnd(1)*16777215) call drawNumbers " DONE",325,250,i,30,10,int(rnd(1)*16777215) call drawNumbers " DONE",325,250,i,30,3,int(rnd(1)*16777215) next i wait
[quit.main] close #main end
sub drawNumbers txt$,x,y,angle,size,thick,color fcos=cos(angle) fsin=sin(angle) r=color and 255 g=(color and 65280)/256 b=(color and 16711680)/65536 print #main.g,"size ";thick;";color ";r;" ";g;" ";b for i = 1 to len(txt$) restore [fontData] t$="" match$="$";mid$(txt$,i,1) while t$<>match$ read t$ if t$="end" then exit while wend if t$<>"end" then read charSize read lines for k=1 to lines read a,b,c,d lastX=a*fcos-b*fsin lastY=a*fsin+b*fcos thisX=c*fcos-d*fsin thisY=c*fsin+d*fcos print #main.g,"line ";lastX*size+x;" ";lastY*size+y;" ";thisX*size+x;" ";thisY*size+y next k x=x+(charSize*size)*fcos y=y+(charSize*size)*fsin end if next i exit sub
[fontData] data "$A",0.8,3,0,0.94,0.28,0.02,0.28,0.02,0.57,0.94,0.17,0.42,0.4,0.42 data "$a",0.76,10,0.4,0.54,0.11,0.54,0.11,0.54,0.05,0.62,0.05,0.62,0.05,0.8,0.05,0.8,0.11,0.88,0.4,0.88,0.11,0.88,0.4,0.88,0.45,0.8,0.45,0.8,0.45,0.62,0.4,0.54,0.45,0.62,0.45,0.77,0.51,0.88,0.51,0.88,0.54,0.88 data "$B",0.6,10,0.05,0.08,0.05,0.94,0.05,0.08,0.34,0.08,0.34,0.08,0.42,0.17,0.42,0.37,0.42,0.17,0.42,0.37,0.34,0.42,0.34,0.42,0.05,0.42,0.34,0.42,0.42,0.54,0.42,0.54,0.42,0.8,0.42,0.8,0.34,0.94,0.34,0.94,0.05,0.94 data "$b",0.6,6,0.08,0.08,0.08,0.94,0.08,0.94,0.37,0.94,0.37,0.94,0.42,0.88,0.42,0.88,0.42,0.71,0.42,0.71,0.37,0.65,0.37,0.65,0.08,0.65 data "$C",0.8,5,0.54,0.05,0.14,0.05,0.14,0.05,0.05,0.17,0.05,0.17,0.05,0.82,0.05,0.82,0.14,0.94,0.14,0.94,0.57,0.94 data "$c",0.56,5,0.4,0.51,0.2,0.51,0.2,0.51,0.14,0.6,0.14,0.82,0.14,0.6,0.14,0.82,0.2,0.91,0.2,0.91,0.4,0.91 data "$d",0.56,6,0.4,0.51,0.2,0.51,0.2,0.51,0.14,0.6,0.14,0.82,0.14,0.6,0.14,0.82,0.2,0.91,0.2,0.91,0.4,0.91,0.4,0.91,0.4,0.08 data "$D",0.72,6,0.02,0.05,0.02,0.94,0.02,0.05,0.37,0.05,0.37,0.05,0.51,0.25,0.51,0.25,0.51,0.74,0.51,0.74,0.37,0.94,0.02,0.94,0.37,0.94 data "$E",0.76,4,0.54,0.91,0.05,0.91,0.05,0.91,0.05,0.05,0.05,0.05,0.54,0.05,0.05,0.48,0.34,0.48 data "$e",0.68,11,0.08,0.48,0.11,0.45,0.11,0.45,0.42,0.45,0.42,0.45,0.45,0.48,0.45,0.48,0.48,0.54,0.48,0.54,0.48,0.62,0.48,0.62,0.11,0.62,0.08,0.48,0.05,0.54,0.05,0.54,0.05,0.8,0.05,0.8,0.08,0.85,0.08,0.85,0.14,0.88,0.14,0.88,0.48,0.88 data "$F",0.76,3,0.02,0.94,0.02,0.08,0.02,0.08,0.54,0.08,0.02,0.4,0.34,0.4 data "$f",0.68,6,0.17,0.94,0.17,0.4,0.17,0.4,0.2,0.31,0.2,0.31,0.25,0.25,0.25,0.25,0.31,0.22,0.31,0.22,0.48,0.22,0.28,0.57,0.05,0.57 data "$G",0.88,18,0.6,0.14,0.48,0.08,0.48,0.08,0.37,0.05,0.37,0.05,0.25,0.05,0.25,0.05,0.14,0.08,0.14,0.08,0.05,0.14,0.05,0.14,0,0.28,0,0.28,0,0.82,0,0.82,0.02,0.91,0.02,0.91,0.08,0.97,0.08,0.97,0.48,0.97,0.48,0.97,0.54,0.94,0.54,0.94,0.6,0.88,0.6,0.88,0.62,0.77,0.62,0.77,0.62,0.6,0.62,0.6,0.54,0.51,0.54,0.51,0.4,0.51,0.4,0.51,0.2,0.51,0.2,0.48,0.2,0.54 data "$g",0.56,13,0.4,0.45,0.4,0.85,0.4,0.85,0.37,0.91,0.37,0.91,0.31,0.97,0.31,0.97,0.05,0.97,0.4,0.45,0.34,0.4,0.34,0.4,0.22,0.37,0.22,0.37,0.11,0.4,0.11,0.4,0.05,0.45,0.05,0.45,0.05,0.6,0.05,0.6,0.11,0.65,0.11,0.65,0.22,0.68,0.22,0.68,0.31,0.65,0.31,0.65,0.4,0.57 data "$H",0.8,3,0.02,0.05,0.02,0.94,0.02,0.51,0.57,0.51,0.57,0.05,0.57,0.94 data "$h",0.64,7,0.05,0.08,0.05,0.94,0.05,0.51,0.11,0.48,0.11,0.48,0.22,0.45,0.22,0.45,0.31,0.45,0.31,0.45,0.42,0.48,0.42,0.48,0.45,0.51,0.45,0.51,0.45,0.94 data "$I",0.84,3,0.08,0.05,0.6,0.05,0.34,0.05,0.34,0.94,0.08,0.94,0.6,0.94 data "$i",0.48,5,0.31,0.91,0.31,0.48,0.28,0.37,0.34,0.37,0.34,0.37,0.34,0.42,0.34,0.42,0.28,0.42,0.28,0.42,0.28,0.37 data "$J",0.84,4,0.37,0.17,0.37,0.94,0.37,0.94,0.05,0.94,0.05,0.94,0.05,0.71,0.6,0.17,0.05,0.17 data "$j",0.56,7,0.37,0.4,0.37,0.94,0.37,0.94,0.14,0.94,0.14,0.94,0.14,0.82,0.37,0.25,0.4,0.28,0.37,0.31,0.4,0.28,0.37,0.31,0.34,0.28,0.34,0.28,0.37,0.25 data "$K",0.76,3,0.02,0.02,0.02,0.94,0.54,0.05,0.02,0.51,0.25,0.31,0.54,0.94 data "$k",0.44,3,0.02,0.14,0.02,0.94,0.02,0.54,0.31,0.31,0.02,0.54,0.31,0.94 data "$L",0.8,2,0.02,0.08,0.02,0.94,0.02,0.94,0.57,0.94 data "$l",0.24,3,0.08,0.17,0.08,0.94,0,0.94,0.17,0.94,0.08,0.17,0.02,0.17 data "$M",0.84,4,0,0.94,0.11,0.22,0.11,0.22,0.28,0.8,0.28,0.8,0.42,0.22,0.42,0.22,0.6,0.94 data "$m",0.76,9,0.02,0.91,0.02,0.4,0.02,0.51,0.08,0.45,0.08,0.45,0.22,0.45,0.22,0.45,0.28,0.51,0.28,0.51,0.28,0.91,0.28,0.51,0.34,0.45,0.34,0.45,0.48,0.45,0.48,0.45,0.54,0.51,0.54,0.51,0.54,0.91 data "$N",0.72,3,0,0.94,0,0.05,0,0.05,0.51,0.94,0.51,0.94,0.51,0.05 data "$n",0.68,5,0.02,0.94,0.02,0.42,0.02,0.48,0.11,0.42,0.11,0.42,0.4,0.42,0.4,0.42,0.48,0.48,0.48,0.48,0.48,0.94 data "$O",0.92,8,0.05,0.05,0,0.11,0,0.11,0,0.91,0,0.91,0.05,0.97,0.05,0.97,0.6,0.97,0.6,0.97,0.65,0.91,0.65,0.91,0.65,0.11,0.65,0.11,0.6,0.05,0.6,0.05,0.05,0.05 data "$o",0.72,8,0.11,0.45,0.05,0.51,0.05,0.51,0.05,0.88,0.05,0.88,0.11,0.94,0.11,0.94,0.45,0.94,0.45,0.94,0.51,0.88,0.51,0.88,0.51,0.51,0.51,0.51,0.45,0.45,0.45,0.45,0.11,0.45 data "$P",0.8,4,0.05,0.08,0.57,0.08,0.57,0.08,0.57,0.4,0.57,0.4,0.05,0.4,0.05,0.08,0.05,0.94 data "$p",0.52,4,0.05,0.94,0.05,0.34,0.05,0.34,0.37,0.34,0.37,0.34,0.37,0.57,0.37,0.57,0.05,0.57 data "$Q",0.92,5,0.05,0.08,0.57,0.08,0.57,0.08,0.57,0.85,0.57,0.85,0.05,0.85,0.05,0.85,0.05,0.08,0.48,0.77,0.65,0.97 data "$q",0.6,4,0.08,0.42,0.42,0.42,0.42,0.42,0.42,0.94,0.42,0.65,0.08,0.65,0.08,0.65,0.08,0.42 data "$R",0.64,6,0.02,0.14,0.02,0.94,0.02,0.14,0.45,0.14,0.45,0.14,0.45,0.48,0.45,0.48,0.02,0.48,0.2,0.48,0.45,0.68,0.45,0.68,0.45,0.94 data "$r",0.64,4,0.02,0.94,0.02,0.37,0.02,0.48,0.17,0.37,0.17,0.37,0.34,0.37,0.34,0.37,0.45,0.45 data "$S",0.84,10,0.6,0.14,0.48,0.05,0.48,0.05,0.14,0.05,0.14,0.05,0.02,0.14,0.02,0.14,0.02,0.4,0.02,0.4,0.14,0.48,0.14,0.48,0.48,0.48,0.48,0.48,0.6,0.57,0.6,0.57,0.6,0.85,0.6,0.85,0.48,0.94,0.48,0.94,0.02,0.94 data "$s",0.72,11,0.48,0.51,0.31,0.45,0.31,0.45,0.17,0.51,0.17,0.51,0.14,0.6,0.14,0.6,0.14,0.68,0.14,0.68,0.34,0.74,0.34,0.74,0.48,0.74,0.48,0.74,0.51,0.8,0.51,0.8,0.51,0.88,0.51,0.88,0.45,0.94,0.45,0.94,0.2,0.94,0.2,0.94,0.14,0.91 data "$T",0.88,2,0.31,0.08,0.31,0.94,0,0.08,0.62,0.08 data "$t",0.72,2,0.31,0.94,0.31,0.31,0.11,0.51,0.51,0.51 data "$U",0.84,3,0,0.02,0,0.94,0,0.94,0.6,0.94,0.6,0.94,0.6,0.02 data "$u",0.68,4,0.02,0.97,0.05,0.91,0.05,0.91,0.05,0.48,0.05,0.91,0.48,0.91,0.48,0.91,0.48,0.48 data "$V",0.88,2,0,0.02,0.31,0.94,0.31,0.94,0.62,0.02 data "$v",0.8,2,0.08,0.48,0.31,0.94,0.31,0.94,0.57,0.51 data "$W",0.84,4,0,0.05,0.17,0.94,0.17,0.94,0.31,0.54,0.31,0.54,0.45,0.94,0.45,0.94,0.6,0.08 data "$w",0.76,4,0.17,0.91,0.28,0.68,0.28,0.68,0.4,0.91,0.4,0.91,0.54,0.62,0.17,0.91,0.02,0.62 data "$X",0.92,2,0,0.02,0.62,0.94,0.65,0.02,0,0.94 data "$x",0.76,2,0.14,0.48,0.54,0.94,0.54,0.48,0.11,0.94 data "$Y",0.92,3,0.02,0.05,0.31,0.37,0.31,0.37,0.65,0.05,0.31,0.37,0.31,0.97 data "$y",0.6,2,0.14,0.48,0.28,0.71,0.42,0.48,0.14,0.97 data "$Z",0.88,3,0,0.02,0.62,0.02,0.62,0.02,0,0.97,0,0.97,0.62,0.97 data "$z",0.72,3,0.05,0.54,0.51,0.54,0.02,0.97,0.51,0.54,0.02,0.97,0.51,0.97 data "$ ",.8,0 data "$0",0.96,5,0.05,0.05,0.62,0.05,0.62,0.91,0.62,0.05,0.05,0.05,0.05,0.91,0.05,0.91,0.62,0.91,0.68,0.11,0,0.85 data "$1",0.72,3,0.31,0.08,0.31,0.91,0.11,0.91,0.51,0.91,0.31,0.08,0.14,0.31 data "$2",0.84,6,0.08,0.22,0.22,0.08,0.22,0.08,0.45,0.08,0.45,0.08,0.6,0.22,0.6,0.22,0.6,0.31,0.6,0.31,0.08,0.91,0.08,0.91,0.6,0.91 data "$3",0.88,11,0.08,0.17,0.2,0.08,0.2,0.08,0.51,0.08,0.51,0.08,0.62,0.17,0.62,0.17,0.62,0.45,0.62,0.45,0.54,0.51,0.54,0.51,0.25,0.51,0.54,0.51,0.62,0.54,0.62,0.54,0.62,0.85,0.62,0.85,0.51,0.94,0.51,0.94,0.17,0.94,0.17,0.94,0.05,0.85 data "$4",0.72,3,0.4,0.88,0.4,0.08,0,0.08,0,0.45,0,0.45,0.51,0.45 data "$5",0.84,7,0.57,0.11,0.11,0.11,0.11,0.11,0.11,0.42,0.11,0.42,0.48,0.4,0.48,0.4,0.6,0.48,0.6,0.48,0.6,0.77,0.6,0.77,0.48,0.85,0.48,0.85,0.14,0.85 data "$6",0.8,5,0.57,0.11,0.05,0.11,0.05,0.11,0.05,0.94,0.57,0.94,0.05,0.94,0.57,0.94,0.57,0.62,0.57,0.62,0.05,0.62 data "$7",0.84,2,0.02,0.08,0.6,0.08,0.6,0.08,0.28,0.91 data "$8",0.84,5,0.02,0.05,0.6,0.05,0.6,0.05,0.6,0.91,0.6,0.91,0.02,0.91,0.02,0.91,0.02,0.05,0.02,0.45,0.6,0.45 data "$9",0.84,4,0.02,0.05,0.6,0.05,0.6,0.91,0.6,0.05,0.6,0.45,0.02,0.45,0.02,0.05,0.02,0.45 data "$.",0.6,4,0.28,0.8,0.42,0.8,0.42,0.91,0.28,0.91,0.28,0.8,0.28,0.91,0.42,0.8,0.42,0.91 data "end" end sub
If you have Alyce's API book, look at page 143 for "See CreateFontA for a detailed explanation of font escapement."
|
|