From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110830 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: lmt_outline Date: Thu, 11 Mar 2021 21:05:13 -0500 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1824317426647422971==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6510"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 12 03:05:57 2021 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 1lKXBd-0001ZJ-5O for gctc-ntg-context-518@m.gmane-mx.org; Fri, 12 Mar 2021 03:05:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 57B1328155F; Fri, 12 Mar 2021 03:05:31 +0100 (CET) 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 yOknK-pmCdpE; Fri, 12 Mar 2021 03:05:29 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id AEF8F2816A2; Fri, 12 Mar 2021 03:05:29 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3059228163B for ; Fri, 12 Mar 2021 03:05:28 +0100 (CET) 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 5VnmxqSjArTn for ; Fri, 12 Mar 2021 03:05:26 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.219.174; helo=mail-yb1-f174.google.com; envelope-from=bateni@gmail.com; receiver= Original-Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (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 474B428155F for ; Fri, 12 Mar 2021 03:05:26 +0100 (CET) Original-Received: by mail-yb1-f174.google.com with SMTP id b10so23817138ybn.3 for ; Thu, 11 Mar 2021 18:05:26 -0800 (PST) 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=cQskU3c71B5uxykVwPs3rJyl1KToPwhsVmYVllddUjc=; b=pIXd1Y5jfOe4ZYRvqqhe9fllsm1S1JZBXj6MighmmypPsETCMIzhKWI4oLnhL7D85V 34Ctl+hUaQeI1EesTyDExGeGOh/a0G8pRmLa2zyulmlR04z9W3HUdcX6JsAoCws5xz0v LsvxAh3nDrkIHfMgkWvvEhU2a++OvQyr0DjOVk0J2U1L94sYBKXqgEuwsMi98ngxYbod PILtK/fJey3VkfAkYcXl6bwSUmqm4HOO/Is2i0p+Au2hIxRRT7Q1Q789EUfaNGNNSB87 9KQDVEAoAW2ve5DEb8aeXBNjZC0Z4UMUL0vgGpodzrGWHECr88q8lKUlx78KTLPhT5jA AUrQ== 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=cQskU3c71B5uxykVwPs3rJyl1KToPwhsVmYVllddUjc=; b=j4+8kXEXRFf4lTTx4g4PMZslsBUHVzlVQ7esNd2HJMe1XCUCRfymOPzLTGx0wF9ygK fQoRsfzebouB9jebFYDvAuTOkweVBN+e7ibZyNJvZ2pXnFrwibg/XxL767oyTicVhuQb 8LxGYM0DhU5ifj/qTGoF7qtg9Z6Ul6oyF6kmyTHjOxH+dAAPctHrbw0JOvz87U0MZle1 mATdrGvTwITPNBVq65CBIXlC/K2l6NxOrGfO/AIFPazNPjwQk5f96uB7xMyEkEnzsB9q 6BNyjVsUI9361lDwxQm2GYGOyUxhsDKqLsX268LSPSoNBDhbE/jbdgm7oKpmg+VLcH7U JKXg== X-Gm-Message-State: AOAM532XNsMaMxKTaZLvLUb5zx3puYkXvf9Ht+7wmVMBo8O8P7rrRpXr bzKNFxhV8DGybAa4viSbUlg+vvNyrBcPbX0UgUxNFmNDVb4= X-Google-Smtp-Source: ABdhPJzDKHMxBN0zDtBdhNviAdc8/pgYu9tJrFdflixbIxdlowJkR2++kHGwE0gttf2ga/z3nCwCxI/+qDfI2zgJsQ0= X-Received: by 2002:a25:dc8:: with SMTP id 191mr16203416ybn.246.1615514724216; Thu, 11 Mar 2021 18:05:24 -0800 (PST) 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:110830 Archived-At: --===============1824317426647422971== Content-Type: multipart/alternative; boundary="00000000000044338705bd4d55e4" --00000000000044338705bd4d55e4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the pointer, Aditya. I had not seen this, but I couldn't get it to do what I wanted. I don't fully understand what nofill does and how it interacts with fill and eofill. I get strange results sometimes. One complication, though, is that the picture I get from lmt_outline seems to cover some part (small area around the joining part) twice, so that messes up the even/odd logic of eofill. Here is one of the things I tried: \starttext \definedfont[dejavusansmono*arabic] \setupalign[r2l] \startMPcode picture op; op :=3D lmt_outline [ text =3D "=D8=B3=D9=84=D8=A7=D9=85", kind =3D "fillup", align =3D "r2l", ] scaled 6mm; for i within op: nofill pathpart i; endfor; for i within op: eofill pathpart i withpen pencircle scaled 1mm; endfor; \stopMPcode \stoptext On Wed, Mar 10, 2021 at 11:09 PM Aditya Mahajan wrote: > On Wed, 10 Mar 2021, Mohammad Hossein Bateni wrote: > > > Hello, > > > > Hans said he's in the metapost mode now :) > > > > I have used lmt_outline in the following example and it is really an > > improvement over the previous outline "effect" because one can set the > > fillcolor and drawcolor separately. (that was not possible before, > right?) > > > > \starttext > > \definedfont[dejavusansmono*arabic] > > \setupalign[r2l] > > \startMPcode > > draw lmt_outline [ > > text =3D "=D8=B3=D9=84=D8=A7=D9=85", > > drawcolor =3D "red", > > fillcolor =3D "white", > > kind =3D "reverse", > > align =3D "r2l", > > ] scaled 3mm; > > \stopMPcode > > \stoptext > > > > 1. This works well on a plain background. I can specify the background > > color in fillcolor and get the outline effect. When the background is = an > > image, this does not work too well. Can we use some clip trickery to > allow > > for "transparent" fill? Ideally I want to set the fillcolor to a speci= al > > value that would lead to only the outlines drawn. > > Have you seen this example on the wiki which uses nofill: > > https://wiki.contextgarden.net/Cover_Pages#Empty_or_Transparent_letters > > > Aditya___________________________________________________________________= ________________ > 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 > > _________________________________________________________________________= __________ > --00000000000044338705bd4d55e4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the pointer, Aditya.=C2=A0 I had not seen this,= but I couldn't get it to do what I wanted.

I don= 9;t fully understand what nofill does and how it interacts with fill and eo= fill.=C2=A0 I get strange results sometimes.=C2=A0 One complication, though= , is that the picture I get from lmt_outline seems to cover some part (smal= l area around the joining part) twice, so that messes up the even/odd logic= of eofill.

Here is one of the things I tried:

\starttext
\definedfont[dejavusansmono*arabic]
= \setupalign[r2l]
\startMPcode
picture op; op :=3D lmt_outline [
= =C2=A0 text =3D "=D8=B3=D9=84=D8=A7=D9=85",
=C2=A0 kind =3D &q= uot;fillup",
=C2=A0 align =3D "r2l",
] scaled 6mm;
= for i within op:
=C2=A0 nofill pathpart i;
endfor;
for i within op= :
eofill=C2=A0pathpart i withpen pencircle scaled 1mm;
endfor;
\st= opMPcode
\stoptext


On Wed, Mar 10, 2021 at 11:09 PM Aditya = Mahajan <adityam@umich.edu> = wrote:
On Wed, 1= 0 Mar 2021, Mohammad Hossein Bateni wrote:

> Hello,
>
> Hans said he's in the metapost mode now :)
>
> I have used lmt_outline in the following example and it is really an > improvement over the previous outline "effect" because one c= an set the
> fillcolor and drawcolor separately.=C2=A0 (that was not possible befor= e, right?)
>
> \starttext
> \definedfont[dejavusansmono*arabic]
> \setupalign[r2l]
> \startMPcode
> draw lmt_outline [
>=C2=A0 =C2=A0text =3D "=D8=B3=D9=84=D8=A7=D9=85",
>=C2=A0 =C2=A0drawcolor =3D "red",
>=C2=A0 =C2=A0fillcolor =3D "white",
>=C2=A0 =C2=A0kind =3D "reverse",
>=C2=A0 =C2=A0align =3D "r2l",
> ] scaled 3mm;
> \stopMPcode
> \stoptext
>
> 1. This works well on a plain background.=C2=A0 I can specify the back= ground
> color in fillcolor and get the outline effect.=C2=A0 When the backgrou= nd is an
> image, this does not work too well.=C2=A0 Can we use some clip tricker= y to allow
> for "transparent" fill?=C2=A0 Ideally I want to set the fill= color to a special
> value that would lead to only the outlines drawn.

Have you seen this example on the wiki which uses nofill:

https://wiki.contextgarden.ne= t/Cover_Pages#Empty_or_Transparent_letters

Aditya_____________________________________________________________________= ______________
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/listinfo/nt= g-context
webpage=C2=A0 : http://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: http://contextgarden.net
___________________________________________________________________________= ________
--00000000000044338705bd4d55e4-- --===============1824317426647422971== 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== --===============1824317426647422971==--