On Sat, Nov 1, 2008 at 1:38 AM, Renaud Aubin <aubin@nibua-r.org> wrote:
Hi,

I have some trouble using a gradient background (solid) with a
transparent element :

 \startMPinclusions
   def test_shade (expr a, b) =
   pickup pencircle scaled 1mm ;
   color ca ; ca := \MPcolor{a} ;
   color cb ; cb := \MPcolor{b} ;
   color cc ; cc := \MPcolor{c} ;
   sh := define_linear_shade(origin
shifted(0cm,.5*\overlayheight),origin,ca,cb) ;
   fill fullsquare xscaled \overlaywidth yscaled \overlayheight
withshade sh;
   draw origin withcolor cc;
   draw origin shifted(0cm,-.25*\overlayheight) withcolor cc;
   enddef ;
 \stopMPinclusions

 \setupcolors[state=start]
 \definecolor[a][r=.57254902,g=.784313725,b=.917647059]
 \definecolor[b][white]
 \definecolor[c][darkred]
 \starttext

 \defineoverlay[bgoverlay][\uniqueMPgraphic{bg_top_shade}]
 \setupbackgrounds[page][background=bgoverlay]
 \startuniqueMPgraphic{bg_top_shade}
   test_shade(origin, origin shifted(0cm,1cm));
   draw fullcircle scaled 10cm shifted (0cm,0.25*\overlayheight)
withcolor transparent(1,0.5,white) withpen pencircle scaled 2cm;

%%%%%%%% If you comment out the previous line the color rendering is
definitelly different...

 \stopuniqueMPgraphic

 \input knuth

\stoptext

This is my test.
Where is the problem ?

minimals-beta
Linux luigicasa-laptop 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686 GNU/Linux
This is LuaTeX, Version snapshot-0.30.2-2008102016, build unknown
ConTeXt MtxRun | current version: 2008.10.31 13:58



--
luigi