On 2011-05-18 Hans Hagen
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