From: "Denis B. Roegel" <Denis.Roegel@loria.fr>
Cc: roegel@lorraine.loria.fr
Subject: Re: TraceRot?
Date: Thu, 2 Nov 2000 13:32:49 +0100 (MET) [thread overview]
Message-ID: <200011021232.NAA07696@bar.loria.fr> (raw)
Thanks for the answers concerning my typo (ouline!),
\setupbodyfont[ber,pcr,10pt] (which works, but where
is my font configuration defined?), \RotFont (which
works now with \useMPlibrary[txt]), \bgroup/\egroup, etc.
However, I still can't manage to make TraceRot work.
Below is my exact example. I do not see tha characters
framed.
Denis
\useMPlibrary[txt]
\setupcolors[state=start]
\starttext
\startMPenvironment
%\setupbodyfont[loc,mt,ppl,pcr,10pt]
\setupbodyfont[loc,mt,10pt]
\definefont[RotFont][RegularBold]
\stopMPenvironment
\startuseMPgraphic{followtokens}
path RotPath; RotPath:=fullcircle scaled 5cm;
\stopuseMPgraphic
\startMPinclusions
boolean TraceRot; TraceRot := true;
\stopMPinclusions
\def\processfollowingtoken#1%
{\appendtoks#1\to\MPtoks
\setbox\MPbox=\hbox{\RotFont\setstrut\strut\the\MPtoks}%
\startMPdrawing
n:=n+1; len[n]:=\the\wd\MPbox;
\stopMPdrawing
\startMPdrawing[-]
pic[n]:=btex \RotFont\setstrut\strut#1 etex;
\stopMPdrawing}
\def\followtokens#1%
{\vbox\bgroup
\MPtoks\emptytoks
\resetMPdrawing
\startMPdrawing
\includeMPgraphic{followtokens}
picture pic[]; numeric len[],n;n:=0;
\stopMPdrawing
\handletokens#1\with\processfollowingtoken
\startMPdrawing
numeric al,pl,at,wid,pos; pair ap,ad;
al:=arclength RotPath;
pl:=(al-len[n])/(n-1);
for i=1 upto n:
wid:=abs(xpart lrcorner pic[i]-xpart llcorner pic[i]);
pos := len[i]-wid/2+(i-1)*pl;
at := arctime pos of RotPath;
ap := point at of RotPath;
ad := direction at of RotPath;
draw pic[i]
shifted (-wid/2,0)
rotated (angle(ad)) shifted ap;
endfor;
\stopMPdrawing
\MPdrawingdonetrue
\getMPdrawing
\resetMPdrawing
\egroup}
\followtokens{We now follow some arbitrary path ...}
\stoptext
next reply other threads:[~2000-11-02 12:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-02 12:32 Denis B. Roegel [this message]
2000-11-02 13:12 ` TraceRot? Hans Hagen
2000-11-03 15:25 ` TraceRot? Denis B. Roegel
-- strict thread matches above, loose matches on Subject: below --
2000-11-02 1:46 TraceRot? Denis B. Roegel
2000-11-02 10:22 ` TraceRot? Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200011021232.NAA07696@bar.loria.fr \
--to=denis.roegel@loria.fr \
--cc=roegel@lorraine.loria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).