From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92462 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: Left border of a rectangle (Metafun) Date: Sun, 30 Aug 2015 10:36:46 +0200 Message-ID: References: <10407382-A082-412B-AF07-2FD55746ABA2@gmail.com> <55E19907.1030708@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/mixed; boundary="===============0429624346==" X-Trace: ger.gmane.org 1440923872 6073 80.91.229.3 (30 Aug 2015 08:37:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Aug 2015 08:37:52 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Aug 30 10:37:38 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 1ZVy7N-0002ZA-M4 for gctc-ntg-context-518@m.gmane.org; Sun, 30 Aug 2015 10:37:37 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5E86D10203 for ; Sun, 30 Aug 2015 10:37:37 +0200 (CEST) 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 Z2C4pLO6J1ni for ; Sun, 30 Aug 2015 10:37:36 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 150691023A for ; Sun, 30 Aug 2015 10:37:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 22B3F101F9 for ; Sun, 30 Aug 2015 10:37:05 +0200 (CEST) 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 8n8oU3u96cBg for ; Sun, 30 Aug 2015 10:37:03 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id DD2F0101F6 for ; Sun, 30 Aug 2015 10:36:56 +0200 (CEST) Original-Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) by filter3-til.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t7U8at6a029694 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 30 Aug 2015 10:36:55 +0200 Original-Received: by wicpl12 with SMTP id pl12so3990872wic.0 for ; Sun, 30 Aug 2015 01:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=e22UogaV17/fVZnMdg45zyP6QnkhFci955CYsd5D4EU=; b=rUoO2m0Zk4Vhhkpt+fvpMzFN52fLIx0cd69t1cL6RE6ekf3/hsTLAlthnwCDz23tgM yy14Ro+afOyP/qWwRnVAUL+kGZt4mZMkQl4mp8I4VKDrlWV+D9z9r8Y05hwgZWMyoz7p KeOaBa4mhdabexPBAZ3mUYH5+H8TRsugnjHEgfDLpMJRUf4FtScb6DvuKypJNVbq5Nt+ fVONnMrK8iyVQ42tu9vFeZM6PcKEjzvR4pvq+ymY/LmKy6dJ4fZ6YOvJQyX4N+yVaud8 Em6CsWzOS+gTXWGKwwVV7dOuEDyUVTbgHoeGx34Mpi4u0VldRRl4AJrepxl4cJYPKlqi h3TQ== X-Received: by 10.180.207.242 with SMTP id lz18mr12784618wic.66.1440923815346; Sun, 30 Aug 2015 01:36:55 -0700 (PDT) Original-Received: from [192.168.0.100] (lns-bzn-35-82-250-203-195.adsl.proxad.net. [82.250.203.195]) by smtp.gmail.com with ESMTPSA id gt10sm12163579wib.20.2015.08.30.01.36.50 for (version=TLS1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Aug 2015 01:36:54 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.2104) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::229; country=BE; region=Brussels Capital; city=Brussels; latitude=50.8466; longitude=4.3528; http://maps.google.com/maps?q=50.8466,4.3528&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06PaUATeC - a0f3fc69807f - 20150830 (trained as not-spam) Received-SPF: pass (filter3-til.mf.surf.net: domain of otared@gmail.com designates 2a00:1450:400c:c05::229 as permitted sender) receiver=filter3-til.mf.surf.net; client-ip=2a00:1450:400c:c05::229; envelope-from=; helo=mail-wi0-x229.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) 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:92462 Archived-At: --===============0429624346== Content-Type: multipart/alternative; boundary="Apple-Mail=_50A0D85C-6E4D-4669-B0C5-5049533FCFD2" --Apple-Mail=_50A0D85C-6E4D-4669-B0C5-5049533FCFD2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Fabrice, Your code works if you add=20 setbounds currentpicture to OverlayBox ; Indeed with this Metapost determines the boundaries of the rectangle of = which you draw the left side. Best regards: OK > On 30 Aug 2015, at 09:50, Fabrice Couvreur = wrote: >=20 > Hi, > Hans Otared and thank you for your suggestions. > A question for Hans : why my code does not give the expected result ? > Fabrice >=20 > 2015-08-29 13:35 GMT+02:00 Hans Hagen >: > On 8/29/2015 1:11 PM, Otared Kavian wrote: > Hi fabrice, >=20 > I dont=E2=80=99t know whether this the best solution, but you can use = the following definition of the MPgraphic Funny: >=20 > \startuseMPgraphic{Funny} > interim linecap :=3D butt ; > path p ; > p :=3D unitsquare xyscaled (OverlayWidth,OverlayHeight) ; > drawoptions (withpen pencircle scaled 6.5pt withcolor = \MPcolor{MyColorA}) ; > draw lrcorner p --urcorner p --ulcorner p withcolor white; > draw ulcorner p --llcorner p ; >=20 > \stopuseMPgraphic >=20 > \startuseMPgraphic{Funny} > interim linecap :=3D butt ; > draw leftboundary OverlayBox ; > setbounds currentpicture to OverlayBox ; > \stopuseMPgraphic >=20 > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com = > | www.pragma-pod.nl = > ----------------------------------------------------------------- >=20 > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > maillist : ntg-context@ntg.nl / = http://www.ntg.nl/mailman/listinfo/ntg-context = > webpage : http://www.pragma-ade.nl / = http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ = > wiki : http://contextgarden.net > = __________________________________________________________________________= _________ >=20 > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > maillist : ntg-context@ntg.nl / = http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > = __________________________________________________________________________= _________ --Apple-Mail=_50A0D85C-6E4D-4669-B0C5-5049533FCFD2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi Fabrice,

Your code works if you add 

 setbounds currentpicture to OverlayBox = ;

Indeed with this Metapost determines the boundaries of the = rectangle of which you draw the left side.

Best regards: OK

On 30 Aug 2015, at 09:50, = Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote:

Hi,
Hans Otared = and thank you for your suggestions.
A question for Hans : why my = code does not give the = expected result ?
Fabrice

2015-08-29 13:35 GMT+02:00 Hans = Hagen <pragma@wxs.nl>:
On = 8/29/2015 1:11 PM, Otared Kavian wrote:
Hi fabrice,

I dont=E2=80=99t know whether this the best solution, but you can use = the following definition of the MPgraphic Funny:

\startuseMPgraphic{Funny}
     interim linecap :=3D butt ;
     path p ;
     p :=3D unitsquare xyscaled = (OverlayWidth,OverlayHeight) ;
     drawoptions (withpen pencircle scaled 6.5pt = withcolor \MPcolor{MyColorA}) ;
     draw lrcorner p --urcorner p --ulcorner p withcolor = white;
     draw ulcorner p --llcorner p ;

\stopuseMPgraphic

\startuseMPgraphic{Funny}
    interim linecap :=3D butt ;
    draw leftboundary OverlayBox ;
    setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic

-----------------------------------------------------------------
                    =                     =   Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 = GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                    =                     =      | www.pragma-pod.nl
-----------------------------------------------------------------

= __________________________________________________________________________= _________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
= __________________________________________________________________________= _________

= __________________________________________________________________________= _________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
_______________________________________________________________= ____________________

= --Apple-Mail=_50A0D85C-6E4D-4669-B0C5-5049533FCFD2-- --===============0429624346== 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= --===============0429624346==--