From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/116110 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: About macro numberstriped () Date: Sun, 2 Oct 2022 10:55:56 +0200 Message-ID: References: <18131ab4-f5c7-b5d0-e331-a1f7ddeac221@freedom.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4950539439982437737==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36771"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Fabrice Couvreur To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 02 10:58:02 2022 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 1oeunQ-0009K8-Am for gctc-ntg-context-518@m.gmane-mx.org; Sun, 02 Oct 2022 10:58:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0BDAB2A3F8D; Sun, 2 Oct 2022 10:57:21 +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 wJ3cfDe-XszM; Sun, 2 Oct 2022 10:57:18 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C3BD12A3643; Sun, 2 Oct 2022 10:57:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5869C2A3642 for ; Sun, 2 Oct 2022 10:57:17 +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 LBH6rq2DFmDv for ; Sun, 2 Oct 2022 10:57:15 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.214.171; helo=mail-pl1-f171.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 C7F0A2A27FD for ; Sun, 2 Oct 2022 10:57:14 +0200 (CEST) Original-Received: by mail-pl1-f171.google.com with SMTP id u24so393050plq.12 for ; Sun, 02 Oct 2022 01:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=AjtxzY9xwSn4SVieTLIl9UPmTGV7W9hgzy/dBm8jw0o=; b=WqIjKhD9Qjh77zQEBl+I3qpfCERsqPullBbODUtpj3wXD4ZZ29+gEBfTLEeNc3w+0q qMfmALarsOsvjxjyPxFp5M98/MUCR2EK5OkichA9IHqWiAfSuZMCCROb5dfkp+1yeoSg DTsbgUGnOaT0gZuXFELzuzrEmOi9K96YGz4nXJQ8yhqGd3N/UfwiR4WtwSWZUsrTlQJu tZn8osOpPm3+HQi1lpRcL06GDalTYPAB9/9vaGnyRUCTTcXV4oMNq9KfAirMuvybtzSL btKSQSHQ1UzLy4L6fgmukR9kFYqGu2QZJHsg76psOyMZpi/88UaxTJ4/s35SVp51fHKh Ue6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=AjtxzY9xwSn4SVieTLIl9UPmTGV7W9hgzy/dBm8jw0o=; b=Ois4aB7I8VYdI1hD81MFKFlLCPj6xj4DM6jy+MXUvSV+a622O/6CMHuncDno2va9WW 3UnuFw1aMEwEzIZ3UXV1u59OakDDBhomYd/XNNjjiAx/LkR8Yc7LOCzR6FvdmJfQU766 srcuIpB3mhyoz253WZkegRsGqwi5fjAJxpza+kt4co9TVs3QVGLNuVJugPQ8wKBGzO0O NEQYSdVO7z8GTWUhNTKeNW3unUs9rWg+RDnp52PEEY45OftroKvCjeZ99WeUGYDR84Zz eFQSsP14aqINdH8tDJopG6rMBVf8CFQ8Nu9OWj07DSmgZbD4WwYxCgcKpHFPZP4H2lqy mpYA== X-Gm-Message-State: ACrzQf2/vf4Abw1ARyyJOEWFpagdh1Jf6d90P6zIY/7NkHIInqoSrXBn PRNUvtRf1nL85uoGC9yr6vl14e8C+r+7W3WMylOSi1Usm9w= X-Google-Smtp-Source: AMsMyM7PH3udn+YzSjgu9rIbYE9a227hWF4m1td2uAqOe16blqlhfvR6smWz1ziNpe5DfWkUujLVHg983BrYKQ48/KM= X-Received: by 2002:a17:902:d401:b0:17e:4fe6:2b8e with SMTP id b1-20020a170902d40100b0017e4fe62b8emr3963538ple.47.1664701032148; Sun, 02 Oct 2022 01:57:12 -0700 (PDT) In-Reply-To: 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:116110 Archived-At: --===============4950539439982437737== Content-Type: multipart/alternative; boundary="000000000000adb2b805ea0969b1" --000000000000adb2b805ea0969b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Initially, there was a bug with maro numberstriped() and Hans suggested another sensible approach to me, but you don't get the same shape of the hatches depending on the dimensions of the squares. Your solution works perfectly but I'm trying to understand the action of the parameters: the first ? the second represents the angle in degrees that the segments make the third represents the gap between two segments Thanks Fabrice Le sam. 1 oct. 2022 =C3=A0 21:46, Mikael Sundqvist via ntg-context < ntg-context@ntg.nl> a =C3=A9crit : > Hi, > > Is this what you are looking for? > > On Sat, Oct 1, 2022 at 7:43 PM Fabrice Couvreur via ntg-context > wrote: > > > > Hi Hans, > > When the rectangles are not identical, how to have the same type of > hatching in both ? > > Thanks. > > Fabrice > > > > > > \starttext > > \startlinecorrection[blank] > > \startmidaligned > > \switchtobodyfont[9pt] > > \startMPcode > > path p, q, r, b ; > > p :=3D unitsquare xyscaled (4cm,4cm) ; > > z[0] =3D (2cm,0cm) ; > > z[1] =3D (2cm,4cm) ; > > z[2] =3D (0cm,2cm) ; > > q :=3D llcorner p--z[0]--z[1]--z[2]--cycle ; > > r :=3D unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; > > b :=3D unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; > > > > draw r anglestriped (1,45,2) withcolor cyan; > draw b anglestriped (1,45,2) withcolor cyan; > > > > > draw p; > > draw b; > > draw r; > > > > label.llft("D", p) ; > > label.lrt("C", p) ; > > label.ulft("A", p) ; > > label.urt("B", p) ; > > label.urt("P", lrcorner r) ; > > label.lft("Q", llcorner r) ; > > label.top("M", urcorner r) ; > > > > \stopMPcode > > \stopmidaligned > > \stoplinecorrection > > \stoptext > > > > > > /Mikael > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > _________________________________________________________________________= __________ > --000000000000adb2b805ea0969b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
Initially, there was a bug with maro numberstriped() and= Hans suggested another sensible approach to me, but you don't get the = same shape of the hatches depending on the dimensions of the squares.
Yo= ur solution works perfectly but I'm trying to understand the action of = the parameters:
the first ?
the second represents the angle in degree= s that the segments make
the third represents the gap between two segmen= ts
Thanks
Fabrice

Le=C2=A0sam. 1 oct. 2022 =C3=A0=C2=A021:46, M= ikael Sundqvist via ntg-context <n= tg-context@ntg.nl> a =C3=A9crit=C2=A0:
Hi,

Is this what you are looking for?

On Sat, Oct 1, 2022 at 7:43 PM Fabrice Couvreur via ntg-context
<ntg-context@ntg= .nl> wrote:
>
> Hi Hans,
> When the rectangles are not identical, how to have the same type of ha= tching in both ?
> Thanks.
> Fabrice
>
>
> \starttext
>=C2=A0 \startlinecorrection[blank]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0\startmidaligned
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\switchtobodyfont[9pt]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\startMPcode
>=C2=A0 =C2=A0path p, q, r, b ;
>=C2=A0 =C2=A0p=C2=A0 :=3D unitsquare xyscaled (4cm,4cm) ;
>=C2=A0 =C2=A0z[0] =3D (2cm,0cm) ;
>=C2=A0 =C2=A0z[1] =3D (2cm,4cm) ;
>=C2=A0 =C2=A0z[2] =3D (0cm,2cm) ;
>=C2=A0 =C2=A0q :=3D llcorner p--z[0]--z[1]--z[2]--cycle ;
>=C2=A0 =C2=A0r :=3D unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
>=C2=A0 =C2=A0b :=3D unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;
>

draw r anglestriped (1,45,2) withcolor cyan;
draw b anglestriped (1,45,2) withcolor cyan;

>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 draw p;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 draw b;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 draw r;
>
>=C2=A0 =C2=A0 =C2=A0 label.llft("D", p) ;
>=C2=A0 =C2=A0 =C2=A0 label.lrt("C", p) ;
>=C2=A0 =C2=A0 =C2=A0 label.ulft("A", p) ;
>=C2=A0 =C2=A0 =C2=A0 label.urt("B", p) ;
>=C2=A0 =C2=A0 =C2=A0 label.urt("P", lrcorner r) ;
>=C2=A0 =C2=A0 =C2=A0 label.lft("Q", llcorner r) ;
>=C2=A0 =C2=A0 =C2=A0label.top("M", urcorner r) ;
>
>=C2=A0 =C2=A0\stopMPcode
>=C2=A0 =C2=A0 =C2=A0 =C2=A0\stopmidaligned
>=C2=A0 =C2=A0 =C2=A0\stoplinecorrection
> \stoptext
>
>

/Mikael
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / https://www.ntg.nl/mailman/listinfo/= ntg-context
webpage=C2=A0 : https://www.pragma-ade.nl / http://context.aanhet.net
archive=C2=A0 :
https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: https://contextgarden.net
___________________________________________________________________________= ________
--000000000000adb2b805ea0969b1-- --===============4950539439982437737== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4950539439982437737==--