On 2011-05-18 Hans Hagen <[email protected]> wrote:
> 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
> […]
Thanks a lot. But I'm still a bit lost in all the
new commands. I can't figure out how to shade from a
particular colour to transparent.
\starttext
\definecolor [trans-t] [t=1, a=normal]
\startMPpage
path p; p:=fullsquare scaled 5cm;
fill p withcolor \MPcolor{red};
% Works if background colour is known and uniform
path p; p:=fullsquare scaled 3cm;
fill p
withshading("linear", llcorner p, urcorner p)
withcolor \MPcolor{blue} shadedinto \MPcolor{red};
path p; p:=fullsquare scaled 5cm shifted (5cm, 0cm);
fill p withcolor \MPcolor{red};
% Shades to white
path p; p:=fullsquare scaled 3cm shifted (5cm, 0cm);
fill p
withshading("linear", llcorner p, urcorner p)
withfromshadecolor \MPcolor{blue} withtoshadecolor \MPcolor{trans-t};
\stopMPpage
\stoptext
Marco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / 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
___________________________________________________________________________________