ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Fabrice Couvreur via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Fabrice Couvreur <fabrice1.couvreur@gmail.com>
Subject: Re: About macro numberstriped ()
Date: Sun, 2 Oct 2022 18:15:26 +0200	[thread overview]
Message-ID: <CACyK-eocH7dF2i24wYZdPr4ZZujzM+-tUadeEZwXWpqYJn-7bA@mail.gmail.com> (raw)
In-Reply-To: <CAHy-LL-kEJpZrB-vZMjHiTqXb7R_yDmUcGgtupJwYJjxpo=HVg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2156 bytes --]

Hi Mikael,
Great job !
Thanks
Fabrice

Le dim. 2 oct. 2022 à 15:37, Mikael Sundqvist via ntg-context <
ntg-context@ntg.nl> a écrit :

> Hi,
>
> On Sun, Oct 2, 2022 at 3:26 PM Hans Hagen via ntg-context
> <ntg-context@ntg.nl> wrote:
> >
> > On 10/2/2022 3:13 PM, Fabrice Couvreur via ntg-context wrote:
> > > Ok, it works very well. Without wanting to insist, how to have the same
> > > hatching with two different figures ?
> > see upcoming mail from Mikael
>
> Oh, OK, here it goes. Hans will probably rename things if he adds this.
>
> \startMPpage[offset=1dk]
>
> vardef Stripe(expr p, a, d) =
> save thestripe ; picture thestripe ; thestripe := nullpicture ;
> save diag ; numeric diag ; diag := 0.55*( abs((urcorner boundingbox p)
> - (llcorner boundingbox p)) ) ;
> thestripe := image (
> draw (-diag,0) -- (diag, 0) &&
> for i = d step d until diag:
> (-diag, i) -- (diag, i) &&
> (-diag,-i) -- (diag,-i) &&
> endfor nocycle
> withpen currentpen ;
> ) ;
> thestripe := thestripe shifted center boundingbox p ;
> thestripe := thestripe rotatedaround(center boundingbox p, a) ;
> clip thestripe to p ;
> thestripe
> enddef ;
>
>
> path p ; p := fullcircle scaled 3cm && (unitsquare scaled 2cm shifted
> (4cm,4cm)) && cycle ;
> fill p withcolor darkred ;
> draw Stripe(p,30,.2cm) withcolor darkgreen ;
>
> path q ; q := fullsquare randomized 0.3 scaled 3cm yshifted 5cm ;
> fill q withcolor yellow ;
> draw Stripe(q,70,.3cm) withcolor red ;
>
> draw Stripe(p && q && cycle, -20, .5cm) withcolor "orange" ;
>
> draw p ;
> draw q ;
>
> \stopMPpage
>
> /Mikael
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3444 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2022-10-02 16:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 17:49 Fabrice Couvreur via ntg-context
2022-09-27 20:04 ` Hans Hagen via ntg-context
2022-09-28 13:11   ` Fabrice Couvreur via ntg-context
2022-09-28 13:29     ` Hans Hagen via ntg-context
2022-09-28 19:04       ` Henning Hraban Ramm via ntg-context
2022-10-01 17:42         ` Fabrice Couvreur via ntg-context
2022-10-01 19:46           ` Mikael Sundqvist via ntg-context
2022-10-02  8:55             ` Fabrice Couvreur via ntg-context
2022-10-02  9:20               ` Floris van Manen via ntg-context
2022-10-02  9:49                 ` Fabrice Couvreur via ntg-context
2022-10-02  9:52                 ` Hans Hagen via ntg-context
2022-10-02 11:02                   ` Fabrice Couvreur via ntg-context
2022-10-02 11:38                     ` Hans Hagen via ntg-context
2022-10-02 13:13                       ` Fabrice Couvreur via ntg-context
2022-10-02 13:26                         ` Hans Hagen via ntg-context
2022-10-02 13:36                           ` Mikael Sundqvist via ntg-context
2022-10-02 16:15                             ` Fabrice Couvreur via ntg-context [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=CACyK-eocH7dF2i24wYZdPr4ZZujzM+-tUadeEZwXWpqYJn-7bA@mail.gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=fabrice1.couvreur@gmail.com \
    /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).