ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Marco <netuse@lavabit.com>
Subject: Re: shading
Date: Wed, 18 May 2011 22:24:27 +0200	[thread overview]
Message-ID: <4DD42AFB.1080501@wxs.nl> (raw)
In-Reply-To: <20110518203046.5f041912@glyph>

On 18-5-2011 8:30, Marco wrote:

> % Error
> % path p; p:=fullsquare scaled 5cm shifted (10cm, 0cm);
> % fill p
> %   withshading("linear", llcorner p, urcorner p)
> %   withcolor \MPcolor{red-t} shadedinto \MPcolor{blue};

don't ask how, but the upcoming beta can handle it

\starttext

\definecolor [red-t]  [r=1,t=.6,a=1]
\definecolor [blue-t] [b=1,t=.4,a=1]

\startMPpage
path p ; p := fullsquare scaled 6cm ;

fill p ;

path p ; p := fullsquare scaled 6cm shifted (-4cm,-4cm);

fill p
     withshading("linear", llcorner p, urcorner p)
     withcolor \MPcolor{red} shadedinto \MPcolor{blue} ;

path p ; p := fullsquare scaled 6cm shifted (4cm,4cm) ;

fill p
     withshading("linear", llcorner p, urcorner p)
     withcolor \MPcolor{red} shadedinto \MPcolor{blue}
     withtransparency(1,.5) ;

path p ; p := fullsquare scaled 6cm shifted (-4cm,4cm) ;

fill p
     withshading("linear", llcorner p, urcorner p)
     withcolor \MPcolor{red} shadedinto \MPcolor{blue-t};

path p ; p := fullsquare scaled 6cm shifted (4cm,-4cm) ;

fill p
     withshading("linear", llcorner p, urcorner p)
     withcolor \MPcolor{blue-t} shadedinto \MPcolor{red};
   % withfromshadecolor \MPcolor{blue-t} withtoshadecolor \MPcolor{red};
\stopMPpage

\stoptext

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


  parent reply	other threads:[~2011-05-18 20:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 16:24 shading Hans Hagen
2011-05-18 18:30 ` shading Marco
2011-05-18 18:55   ` shading Henning Hraban Ramm
2011-05-18 19:25     ` shading Hans Hagen
2011-05-18 19:18   ` shading Hans Hagen
2011-05-18 20:24   ` Hans Hagen [this message]
2011-05-19 10:08     ` shading Marco
2011-05-19 10:55       ` shading Hans Hagen
2011-05-19 12:22         ` shading Marco
2020-02-25 11:34 Shading Fabrice Couvreur
2020-02-25 16:18 ` Shading Wolfgang Schuster
2020-02-26 10:34   ` Shading Fabrice Couvreur

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=4DD42AFB.1080501@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=netuse@lavabit.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).