On Wed, 23 May 2018 18:40:14 +0200
Pablo Rodriguez <oi...@gmx.es> wrote:

> I have the following sample:
> 
>   \starttext
>   \edef\TextInside{Just follow the tokens}
>   \startMPpage
>     path p ; p := reverse halfcircle scaled .6TextWidth;
>     path q ; q := halfcircle rotatedaround (origin, 180)
>         scaled (.6TextWidth + .75LineHeight);
>     %~ draw fullcircle scaled .6TextWidth;
>     draw followtext(p, "·\TextInside") ;
>     draw followtext(q, "\TextInside·") ;
>     path c ; c := (origin -- (6, 0) -- (0.5, -4) -- (3, 2) --
>         (5.5, -4) -- cycle) scaled 1.25cm ;
>     %~ c := c shifted (-3,-3) ;
>     draw followtext(c, "\dorecurse{500}{\utfchar{"EB09}}") ;
>   \stopMPpage
>   \stoptext
> 
> How can I shift the path c (I mean, the one that draws a star?
> 
> I have tried to add the shifted option to the path definition and
> drawing and there was no shift in the MP page.

(If you only have one MPpage, then there is no need for \starttext\stoptext).

  \edef\TextInside{Just follow the tokens}
  \startMPpage
    path p ; p := reverse halfcircle scaled .6TextWidth;
    path q ; q := halfcircle rotatedaround (origin, 180)
        scaled (.6TextWidth + .75LineHeight);
    %~ draw fullcircle scaled .6TextWidth;
    draw followtext(p, "·\TextInside") ;
    draw followtext(q, "\TextInside·") ;
    path s ; s := (dir30--dir150--dir315--dir90--dir225--cycle) scaled 
.3TextWidth ;
    for i=0 upto 500 :
      draw textext("\utfchar{"EB09}") scaled .5
        shifted point (i/500*length s) of s ;
    endfor
  \stopMPpage
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to