From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90196 Path: news.gmane.org!not-for-mail From: John Kitzmiller Newsgroups: gmane.comp.tex.context Subject: Re: Hatch an area with Metapost (Metafun) Date: Wed, 11 Feb 2015 06:45:13 -0500 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/mixed; boundary="===============0715293364==" X-Trace: ger.gmane.org 1423655572 19647 80.91.229.3 (11 Feb 2015 11:52:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Feb 2015 11:52:52 +0000 (UTC) Cc: couvreur.fabrice@wanadoo.fr To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 11 12:52:39 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YLVqR-0008En-9m for gctc-ntg-context-518@m.gmane.org; Wed, 11 Feb 2015 12:52:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A5EB41022D for ; Wed, 11 Feb 2015 12:52:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IYjjojf2sUX2 for ; Wed, 11 Feb 2015 12:52:37 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9943710230 for ; Wed, 11 Feb 2015 12:52:13 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B7EBD101E8 for ; Wed, 11 Feb 2015 12:52:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8coRKQSLkR2c for ; Wed, 11 Feb 2015 12:52:08 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id C936C101E6 for ; Wed, 11 Feb 2015 12:52:05 +0100 (CET) Original-Received: from bosmailout10.eigbox.net (bosmailout10.eigbox.net [66.96.188.10]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t1BBq4uh026969 for ; Wed, 11 Feb 2015 12:52:04 +0100 Original-Received: from bosmailscan10.eigbox.net ([10.20.15.10]) by bosmailout10.eigbox.net with esmtp (Exim) id 1YLVpr-00056N-M6 for ntg-context@ntg.nl; Wed, 11 Feb 2015 06:52:03 -0500 Original-Received: from [10.115.3.33] (helo=bosimpout13) by bosmailscan10.eigbox.net with esmtp (Exim) id 1YLVpr-0000FO-FV for ntg-context@ntg.nl; Wed, 11 Feb 2015 06:52:03 -0500 Original-Received: from bosauthsmtp10.yourhostingaccount.com ([10.20.18.10]) by bosimpout13 with id qzrj1p00E0D2CUy01zrmwF; Wed, 11 Feb 2015 06:52:03 -0500 X-Authority-Analysis: v=2.1 cv=KtbD2AmN c=1 sm=1 tr=0 a=Kpo39fPXdbgqDwiI3/AEUA==:117 a=zZnF5NfzC91SodgphIyqyQ==:17 a=pq4jwCggAAAA:8 a=QPcu4mC3AAAA:8 a=esbi5I81GEsA:10 a=y85PGfU6AAAA:8 a=C_IRinGWAAAA:8 a=0HtSIViG9nkA:10 a=7KaJ-3d08gjZbwj_JzkA:9 a=CjuIK1q_8ugA:10 a=3xa1EjTbeRA5tPd2CXYA:9 a=6-LlEVHL1DZqEegO:21 a=_W_S_7VecoQA:10 Original-Received: from c-24-128-163-193.hsd1.nh.comcast.net ([24.128.163.193]:51225 helo=[10.0.0.3]) by bosauthsmtp10.eigbox.net with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim) id 1YLVpX-0006vf-Jh; Wed, 11 Feb 2015 06:51:43 -0500 In-Reply-To: X-Mailer: Apple Mail (2.1993) X-EN-UserInfo: 08df34410b47fe835bedcf202d0c2be6:931c98230c6409dcc37fa7e93b490c27 X-EN-AuthUser: kitz@inradius.net X-EN-OrigIP: 24.128.163.193 X-EN-OrigHost: c-24-128-163-193.hsd1.nh.comcast.net X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=66.96.188.10; country=US; region=Massachusetts; city=Burlington; latitude=42.5048; longitude=-71.1956; http://maps.google.com/maps?q=42.5048,-71.1956&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03NOXQ4Pv - 9b6da78c514e - 20150211 (trained as not-spam) Received-SPF: pass (filter3-ams.mf.surf.net: domain of SRS0=dmzBEm=C5=inradius.net=kitz@eigbox.net designates 66.96.188.10 as permitted sender) receiver=filter3-ams.mf.surf.net; client-ip=66.96.188.10; envelope-from=; helo=bosmailout10.eigbox.net; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:90196 Archived-At: --===============0715293364== Content-Type: multipart/alternative; boundary="Apple-Mail=_A3584AA4-09E7-479C-B7B9-B0862AA67BAC" --Apple-Mail=_A3584AA4-09E7-479C-B7B9-B0862AA67BAC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Feb 10, 2015, at 3:42 PM, couvreur.fabrice@wanadoo.fr = wrote: > Is it possible to have some explanation of the parameters of the = macro numberstriped(#1,#2,#3) ? > How to have horizontal hatching ? (How to change the slope = hatching ?) There is also anglestriped in mp-tool with some examples. The second = argument changes the angle. \startMPpage[offset=3D2mm] path p, q ; p :=3D unitsquare scaled 4cm ; z1 =3D point 3.6 of p ; q :=3D subpath (0,2) of p -- z1 -- cycle; q :=3D q shifted(-4cm,-4cm); draw q anglestriped(1,180,6) withcolor blue; draw p ;=20 \stopMPpage (I have not yet found why the striped path q goes out of position. = Looking at mp-tool may help.) > I just noticed that the position of labels is not quite the same = when using macros and macro Metafun Metapost: > I think the labels are too near to the corners of the square with = the macro Metafun. Try the mpost variable lableoffset :=3D ? to adjust. HTH, John= --Apple-Mail=_A3584AA4-09E7-479C-B7B9-B0862AA67BAC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii On Feb 10, 2015, at 3:42 PM, couvreur.fabrice@wanadoo.fr wrote:
Is it  possible to have  some = explanation of  the parameters of  the  macro =  numberstriped(#1,#2,#3)  ?
How to have  horizontal hatching  ? =  (How to  change the slope  hatching =  ?)

There = is also anglestriped in mp-tool with some examples. The second argument = changes the angle.

\startMPpage[offset=3D2mm]
  = path p, q ;
  p :=3D unitsquare scaled 4cm = ;
  z1 =3D point 3.6 of p ;
  q :=3D = subpath (0,2) of p -- z1 -- cycle;
  q :=3D q = shifted(-4cm,-4cm);
  draw q anglestriped(1,180,6) = withcolor blue;
  draw p = ; 
\stopMPpage

(I = have not yet found why the striped path q goes out of position. Looking = at mp-tool may help.)

I  just = noticed  that the position of  labels  is not  quite = the  same  when using  macros  and macro =  Metafun Metapost:
I think the  labels = are  too near to the  corners of the square  with the =  macro  Metafun.

Try the mpost variable lableoffset :=3D ? to = adjust.

HTH,
John
= --Apple-Mail=_A3584AA4-09E7-479C-B7B9-B0862AA67BAC-- --===============0715293364== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0715293364==--