ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Fabrice Couvreur <fabrice1.couvreur@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Cover page (Metafun)
Date: Fri, 14 Aug 2015 18:53:10 +0200	[thread overview]
Message-ID: <CACyK-epUbzv1wb0e1WEAA0UYYMOvsLzhQBev4Wp9HWAfqkDTWQ@mail.gmail.com> (raw)


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

Hi Hans,
To progress in the use of Metafun, I try to do the same cover page as
your document
'Metafun ". Without looking at the code (but using the definitions of your
colors), I managed to get the mosaic.
I would write the word "MATHÉMATIQUES" as you did with the word "CONTEXTEN".
Thank you,
Fabrice


\setuppagenumbering[location=]

\setupcolors
  [state=start]

\definecolor[maincolor][g=.6]
\definecolor[pagecolor][s=.6]
\definecolor[darkcolor][s=.2]
\definecolor[textcolor][r=.6]


\startMPinclusions
  color maincolor ; maincolor := \MPcolor{maincolor} ;
  color pagecolor ; pagecolor := \MPcolor{pagecolor} ;
  color darkcolor ; darkcolor := \MPcolor{darkcolor} ;
  color textcolor ; textcolor := \MPcolor{textcolor} ;
\stopMPinclusions

\startuseMPgraphic{CoverPage}
  path p ; p := OverlayBox xyscaled (1/2,1/7) ;
  fill OverlayBox withcolor pagecolor ;
  path q ; q := p enlarged -12pt randomized 12pt ;
  pair a ;
  for j=0 upto 6 :
     for i=0 upto 1 :
        a := (i*xpart urcorner p,j*ypart urcorner p) ;
        q := p enlarged -12pt randomized 12pt shifted a ;
        circular_shade
          (q, ceiling(uniformdeviate 4), maincolor, .5maincolor) ;
       draw q withpen pencircle scaled 8pt withcolor darkcolor ;
      endfor ;
    endfor ;
\stopuseMPgraphic

\defineoverlay[CoverPage][\useMPgraphic{CoverPage}]

\setupbackgrounds
  [rightpage]
  [background=CoverPage]

\starttext

\stoptext

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

                 reply	other threads:[~2015-08-14 16:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-epUbzv1wb0e1WEAA0UYYMOvsLzhQBev4Wp9HWAfqkDTWQ@mail.gmail.com \
    --to=fabrice1.couvreur@gmail.com \
    --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).