From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108449 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jairo A. del Rio" Newsgroups: gmane.comp.tex.context Subject: Re: A dumb question about MetaFun Date: Sun, 16 Aug 2020 16:31:56 -0500 Message-ID: References: <2CF72D14-11D6-4550-AC84-E43461C763E4@elvenkind.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7881599447579466247==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4053"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Aug 16 23:32:31 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7QGV-0000wy-K4 for gctc-ntg-context-518@m.gmane-mx.org; Sun, 16 Aug 2020 23:32:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8AB131A839F; Sun, 16 Aug 2020 23:32:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nEUa4lIXwEgg; Sun, 16 Aug 2020 23:32:11 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 94DA41A83A0; Sun, 16 Aug 2020 23:32:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7A83F1A839F for ; Sun, 16 Aug 2020 23:32:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BbOSznlzMCOW for ; Sun, 16 Aug 2020 23:32:09 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.46; helo=mail-wm1-f46.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 960811A8388 for ; Sun, 16 Aug 2020 23:32:09 +0200 (CEST) Original-Received: by mail-wm1-f46.google.com with SMTP id c19so12034756wmd.1 for ; Sun, 16 Aug 2020 14:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=5+eGyi563UBEu8uXGgsnorZqoIXrFeTvQEJurfMPaGo=; b=e6z0wvw6wwrnuISi+fEZ2OVQTsvHjw6paaqJxfOPcyxttZWigCcIEjh0pZCQV3bQyX MyFmNyHAh9Cw94PQyYhCfDuUVs3W2uaqsZdTXPVgswqGaJ9Ah19uII3ZAWd2mw/PLLiL QHEEsHZ5yaSsZ97hqzaPT07sK2oIQeYmRJq9ayvpBxWi1i/xy2htmCtss1L5Atd/469/ 0jtjww2G5TZvcvpd9RlLzYyUdcZBiV3X9xmPPLh5BeJ0Hox1tDKEQelx8uO3i7R3R2/y HlQZdlcOdnT8qFG2uK2z17oy6mgf+zsWrc5QDAAmewreoF6o429hvbLTb0Vnf1gCd1Ep C7mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=5+eGyi563UBEu8uXGgsnorZqoIXrFeTvQEJurfMPaGo=; b=CQhqcP8LOKXTmhZmgtiIrzwVu5Thq/MtHIUnYK3FaIVm+KUO5tLLSlcVnhLENYBrW+ 1Km14Pie22uFPPy9OqOCwUVNq5GaJvnRhhY9d904eT6vdj5kUKPqpFXMkNuOd9huckJr IC1RmCJ/HSD58CR5YAX4c6/pFZP1Nkh8qxChPJQtA65vVnu8q6yVJ6w1wKcGX/SOhK9w WP2ULGinZWgBLn0bokk3BVp9u1DKnjm/oKpxjEfkT0isP9KcIGicciY4Go0/fpGqoC6j KhJgXYpOa+IVXW+kL3YFLuELvhRWfr+mYuqj4K85ggYdem5OnBzaZMwtor8263SlD6wX ruqA== X-Gm-Message-State: AOAM530TV+PUQwiEMyw5NAjCbxA+yJId1657EPPIcamoCE1xsHVwtvyN +YpXI1id/DoNxNo0iSdEQYInu5MU1NOvv2CARSIaUxRbDpQ= X-Google-Smtp-Source: ABdhPJwj96nV50yqz7JfJ9hn1vL3/MEocuFOek95PFNAXt+lBSzvAY/OGujdAl4kFJ5Q43VpPmT0px7Ur/O2cK7UU1M= X-Received: by 2002:a1c:a553:: with SMTP id o80mr11892149wme.50.1597613528922; Sun, 16 Aug 2020 14:32:08 -0700 (PDT) In-Reply-To: <2CF72D14-11D6-4550-AC84-E43461C763E4@elvenkind.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:108449 Archived-At: --===============7881599447579466247== Content-Type: multipart/alternative; boundary="000000000000e13e0905ad05628a" --000000000000e13e0905ad05628a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 escribi=C3=B3: > > > > On 16 Aug 2020, at 21:09, Keith McKay 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 =3D > hide(xshift :=3D xpart t - (xpart urcorner p + xpart llcorner p)/2 ; > yshift :=3D 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@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 > > _________________________________________________________________________= __________ > --000000000000e13e0905ad05628a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I found another workaround, but I'm going to try this= . Thank you, Keith, and thank you, Taco.=C2=A0

<= div dir=3D"auto">Cordially,=C2=A0

Jairo :)

El dom., 16 de ago. de 2020 3:36 p. m., Taco Hoekwater <taco@elvenkind.com> escribi=C3=B3:


> On 16 Aug 2020, at 21:09, Keith McKay <mckaymeister@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 con= versation 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 =3D
=C2=A0hide(xshift :=3D xpart t - (xpart urcorner p + xpart llcorner p)/2 ;<= br> =C2=A0 =C2=A0 =C2=A0 yshift :=3D ypart t - (ypart urcorner p + ypart llcorn= er p)/2 ; )
=C2=A0p 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 t= he Wiki!

maillist :
ntg-context@ntg.nl / http://= www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://= context.aanhet.net
archive=C2=A0 : https://bitbucket.org/ph= g/context-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000e13e0905ad05628a-- --===============7881599447579466247== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============7881599447579466247==--