From: Floris van Manen <vm@klankschap.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: filling overlap ?
Date: Sun, 7 Oct 2018 13:43:03 +0200 [thread overview]
Message-ID: <C98A169D-4480-4E65-BEE9-D2AE3D9FE42E@klankschap.nl> (raw)
In-Reply-To: <CAHy-LL9qHAo2O+w-RdNyg4bia3HV2SVPKkrP_3nSksHA__eWkw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2795 bytes --]
so digging a little deeper brings me this solution:
path p ; p := fullsquare xscaled 10mm yscaled 12mm superellipsed .7 ;
path q ; q := fullsquare xscaled 9mm yscaled 11mm superellipsed .7 ;
q := q shifted (3mm, -2mm);
path r ; r := fullsquare xscaled 8mm yscaled 10mm superellipsed .7 ;
r := r shifted (0mm, -4mm);
fill p withcolor red ;
clip currentpicture to q ;
clip currentpicture to r ;
draw p ;
draw q ;
draw r ;
> On 7 Oct 2018, at 13:19, Mikael P. Sundqvist <mickep@gmail.com> wrote:
>
> On Sun, Oct 7, 2018 at 1:10 PM Floris van Manen <vm@klankschap.nl> wrote:
>>
>> Could someone point me to te way as how to fill only the overlap of three paths using metafun ?
>>
>> path p ; p := fullsquare xscaled 10mm yscaled 12mm superellipsed .7 ;
>> path q ; q := fullsquare xscaled 9mm yscaled 11mm superellipsed .7 ;
>> q := q shifted (3mm, -2mm);
>> path r ; r := fullsquare xscaled 8mm yscaled 10mm superellipsed .7 ;
>> r := r shifted (0mm, -4mm);
>> draw p ;
>> draw q ;
>> draw r ;
>>
>>
>>
>> Thanks
>> .Floris
>>
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
>
> Hi!
>
> This is something similar as in page 304 of the manual
> http://www.pragma-ade.com/general/manuals/metafun-p.pdf
>
> \startMPpage
> path p ; p := fullsquare xscaled 10mm yscaled 12mm superellipsed .7 ;
> path q ; q := fullsquare xscaled 9mm yscaled 11mm superellipsed .7 ;
> q := q shifted (3mm, -2mm);
> path r ; r := fullsquare xscaled 8mm yscaled 10mm superellipsed .7 ;
> r := r shifted (0mm, -4mm);
> path pr,pqr;
> pr = buildcycle(p, r);
> %fill pr withcolor 0.5white;
> pqr = buildcycle(q,pr) ;
> fill pqr withcolor darkyellow;
> draw p ;
> draw q withcolor darkred;
> draw r withcolor darkblue;
> \stopMPpage
>
> /Mikael
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2018-10-07 11:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-07 11:09 Floris van Manen
2018-10-07 11:19 ` Mikael P. Sundqvist
2018-10-07 11:26 ` Floris van Manen
2018-10-07 11:43 ` Floris van Manen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C98A169D-4480-4E65-BEE9-D2AE3D9FE42E@klankschap.nl \
--to=vm@klankschap.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).