From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/98907 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Background with rounded corners (Metafun) Date: Wed, 23 Aug 2017 01:20:15 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2291888235138473925==" X-Trace: blaine.gmane.org 1503444178 8828 195.159.176.226 (22 Aug 2017 23:22:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 22 Aug 2017 23:22:58 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 23 01:22:53 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkIVV-0001st-W3 for gctc-ntg-context-518@m.gmane.org; Wed, 23 Aug 2017 01:22:50 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A404687FD1; Wed, 23 Aug 2017 01:20:29 +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 o8izHb45BZZT; Wed, 23 Aug 2017 01:20:28 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id E8EB387FD5; Wed, 23 Aug 2017 01:20:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0069C87FD3 for ; Wed, 23 Aug 2017 01:20:28 +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 htk_gBZwPQEP for ; Wed, 23 Aug 2017 01:20:27 +0200 (CEST) Original-Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 09F3887FD1 for ; Wed, 23 Aug 2017 01:20:17 +0200 (CEST) Original-Received: by mail-wm0-f43.google.com with SMTP id l19so3976079wmi.1 for ; Tue, 22 Aug 2017 16:20:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Rnocja7my4v6kNYNaB1GR7nb00cTpRlFvgT/NBWQCTg=; b=C4BzUspn1s3rcCZuVfAj4QdMtMsAyXBGrIXK3VJiTRg0s0jhZUcudwJhwCwZK7Iz90 KiTMUMBHvjRlu5CV5C3YvMKiT0E5VgaBciZ7z2zA1E4GcUHfNGV5ipfmdxKw41p76l6Z l7GMyworRU3XI77RcgLzmNslUgb/vK/Jvko7rcqB1Fdz7kpy+tBgtVniW/VptzYmWwuV AIyCCojQ3uZuZzX2+4nmbnZ8y/+IRX42SF9FtgMIuPgX+QA3r8gXsFZ/DeYLXJVNAdCA nRr/QhAuFtUaOICn01RqIC2V8ROGuXR1+7rje5ne3soa5WEyfP/4VmUXs2fxQvbVvK4D D/Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Rnocja7my4v6kNYNaB1GR7nb00cTpRlFvgT/NBWQCTg=; b=jO6bt/iFBF3MAHS4Q/3mJKL7xe2+mfD0/WSSYK8rBuZF9u40BHYTlJ6O0OxZQPP8a4 rzYLBy9ywgCLfqPStNTkUjM6iYCIcsLJXEnWb9M78UGM3R9M/N/OdfO1JdSVa593Hrfx r3C3b6qWPu0Ndgndwjl7fWDS7oj15GqvsvDpBNK9Flry0NqktMVkRReJj173R0Wtfosw vpgacp3cJC53qKnJOjhZndrpKTonH7xnbk17yQGkwGwJvBHvLdOA5jsHWPrK4+hEzqJY 7vl3jSeobcOsLk3Sx4aPmUvubOAn/NrrW77yjGN2CLDgchmUHEF8TLfrXNbbEgmR1BeM XWJQ== X-Gm-Message-State: AHYfb5guTHw3yuFNi0GOAWBYnGN7NC/QOCgId2qe8XeQsk/TB6fOPAay guQlOasv81Q66C7ETfnHEBzA56ep6w== X-Received: by 10.80.165.134 with SMTP id a6mr1411287edc.26.1503444016565; Tue, 22 Aug 2017 16:20:16 -0700 (PDT) Original-Received: by 10.80.205.92 with HTTP; Tue, 22 Aug 2017 16:20:15 -0700 (PDT) In-Reply-To: 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:98907 Archived-At: --===============2291888235138473925== Content-Type: multipart/alternative; boundary="f403045c1be28c120205575fd6e6" --f403045c1be28c120205575fd6e6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry 'corner=3D00' ! 2017-08-23 1:01 GMT+02:00 Fabrice Couvreur : > Hi Aditya, > Sorry I forgot to attach the image of what I want to do. I know corner=3D= number > parameter of framed and framed text but I wanted to do it with Metafun. > Thank you > Fabrice > > 2017-08-23 0:50 GMT+02:00 Aditya Mahajan : > >> On Wed, 23 Aug 2017, Fabrice Couvreur wrote: >> >> Hello, >>> I would like to have three corners rounded as in the figure. >>> >> >> Not sure if you had simplified your example or not. But if all you want >> is a rounded corner, you can consider using corner=3Dnumber parameter of >> framed and framed text: >> >> http://wiki.contextgarden.net/Framed#Rounded_Corners >> >> Here is an example (that does not use metapost). >> >> \definecolor[MyColorA][r=3D0.8784, g=3D0.8784, b=3D0.8784] >> \definecolor[MyColorB][c=3D0.00,m=3D0.27,y=3D1.00,k=3D0.00] >> >> \defineornament >> [FrameTitle] >> [preset=3Dlefttop] >> [ >> frame=3Doff, >> foregroundstyle=3D\bfx, >> foregroundcolor=3Dwhite, >> background=3Dcolor, >> backgroundcolor=3DMyColorB, >> ] >> >> \defineframedtext >> [FramedText] >> [ >> offset=3D0.6em, >> toffset=3D\lineheight, >> background=3Dcolor, >> backgroundcolor=3DMyColorA, >> foregroundstyle=3D{\switchtobodyfont[10pt]}, >> align=3Dverytolerant, >> frame=3Doff, >> corner=3D01, >> ] >> >> >> \showframe >> \starttext >> >> \FrameTitle{Info}{\startFramedText[width=3D10cm] >> L'=C3=A9quivalent vingt pieds (EVP) est une unit=C3=A9 de mesure d= e conteneurs >> (de longueur courante 20 pieds, soit environ \unit{6,1 meter}). >> >> 1 EVP repr=C3=A9sente environ \unit{38,5 cubic meter}. >> \stopFramedText} >> >> \stoptext >> ____________________________________________________________ >> _______________________ >> If your question is of interest to others as well, please add an entry t= o >> the Wiki! >> >> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list >> info/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ____________________________________________________________ >> _______________________ >> > > --f403045c1be28c120205575fd6e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry 'corner=3D00' !

2017-08-23 1:01 GMT+02:00 Fabrice C= ouvreur <fabrice1.couvreur@gmail.com>:
Hi Aditya,
Sorry I forgot to attach the = image of what I want to do. I know corner=3Dnumber parameter of framed and framed text but = I wanted to do it with Metafun.
Thank you
=
Fabrice

2017-08-23 0:50 GMT+02:00 Aditya Mahajan <adityam@umich.edu>:
On Wed, 23 Aug 2017, Fabrice Couvreur wrote:

Hello,
I would like to have three corners rounded as in the figure.

Not sure if you had simplified your example or not. But if all you want is = a rounded corner, you can consider using corner=3Dnumber parameter of frame= d and framed text:

http://wiki.contextgarden.net/Framed#Rounde= d_Corners

Here is an example (that does not use metapost).

\definecolor[MyColorA][r=3D0.8784, g=3D0.8784, b=3D0.8784]
\definecolor[MyColorB][c=3D0.00,m=3D0.27,y=3D1.00,k=3D0.00]

\defineornament
=C2=A0 =C2=A0 [FrameTitle]
=C2=A0 =C2=A0 [preset=3Dlefttop]
=C2=A0 =C2=A0 [
=C2=A0 =C2=A0 =C2=A0 frame=3Doff,
=C2=A0 =C2=A0 =C2=A0 foregroundstyle=3D\bfx,
=C2=A0 =C2=A0 =C2=A0 foregroundcolor=3Dwhite,
=C2=A0 =C2=A0 =C2=A0 background=3Dcolor,
=C2=A0 =C2=A0 =C2=A0 backgroundcolor=3DMyColorB,
=C2=A0 =C2=A0 ]

\defineframedtext
=C2=A0 [FramedText]
=C2=A0 [
=C2=A0 =C2=A0 offset=3D0.6em,
=C2=A0 =C2=A0 toffset=3D\lineheight,
=C2=A0 =C2=A0 background=3Dcolor,
=C2=A0 =C2=A0 backgroundcolor=3DMyColorA,
=C2=A0 =C2=A0 foregroundstyle=3D{\switchtobodyfont[10pt]},
=C2=A0 =C2=A0 align=3Dverytolerant,
=C2=A0 =C2=A0 frame=3Doff,
=C2=A0 =C2=A0 corner=3D01,
=C2=A0 ]


\showframe
\starttext

\FrameTitle{Info}{\startFramedText[width=3D10cm]
=C2=A0 =C2=A0 =C2=A0 L'=C3=A9quivalent vingt pieds (EVP) est une unit= =C3=A9 de mesure de conteneurs
(de longueur courante 20 pieds, soit environ \unit{6,1 meter}).

=C2=A0 =C2=A0 =C2=A0 1 EVP repr=C3=A9sente environ \unit{38,5 cubic meter}.=
=C2=A0 =C2=A0 \stopFramedText}

\stoptext
_____________________________________________= ______________________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listin= fo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
_________________________________________________________________= __________________


--f403045c1be28c120205575fd6e6-- --===============2291888235138473925== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============2291888235138473925==--