[NTG-context] A dumb question about MetaFun
Jairo A. del Rio
jairoadelrio6 at gmail.com
Sun Aug 16 23:31:56 CEST 2020
I found another workaround, but I'm going to try this. Thank you, Keith,
and thank you, Taco.
Cordially,
Jairo :)
El dom., 16 de ago. de 2020 3:36 p. m., Taco Hoekwater <taco at elvenkind.com>
escribió:
>
>
> > On 16 Aug 2020, at 21:09, Keith McKay <mckaymeister at gmail.com> wrote:
> >
> > Jairo
> >
> > Try
> >
> > draw unitsquare scaled 1cm shifted (xcm, ycm);
> >
> > Page 11 of the manual metafun-p.pdf is your friend here. My recent
> conversation with Taco on this list will be usefull as well.
>
> Also:
>
> \starttext
> \startMPpage
> % puts the center of the bbox of path p at the point t
> primarydef p centered t =
> hide(xshift := xpart t - (xpart urcorner p + xpart llcorner p)/2 ;
> yshift := ypart t - (ypart urcorner p + ypart llcorner p)/2 ; )
> p shifted (xshift,yshift)
> enddef;
>
> draw fullsquare scaled 2cm shifted (50,3) centered (100,100);
>
> % just for reference:
> drawdot origin withpen pencircle scaled 10 withcolor red;
> drawdot (100,100) withpen pencircle scaled 10 withcolor green;
> \stopMPpage
> \stoptext
>
> (I thought there was a metafun definition for that but I cannot find it).
>
> Best wishes,
> Taco
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context at 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
>
> ___________________________________________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200816/268b3f5b/attachment.htm>
More information about the ntg-context
mailing list