Hi,

some months ago the withshading, withfromshadecolor etc. have apparently been
replaced by the more general withshademethod, withshadevector,
withshadecolors, etc. methods.

I have issues converting the old withshading code to the withshademethod
version. The old code had no problems shading to transparent:

\definecolor [trans] [a=multiply, t=.5, s=.5]
\starttext
\startMPcode
  path p; p:=fullsquare xyscaled (8cm, 8cm);
  fill p
    withshading("linear", ulcorner p, llcorner p)
    withfromshadecolor \MPcolor{black}
    withtoshadecolor   \MPcolor{trans};
\stopMPcode
\stoptext

The new code appears to work in general, but only if no shading to
transparent is being used:

\definecolor [trans] [a=multiply, t=.5, s=.5]
\starttext
  \startMPcode
    % works
    fill fullcircle scaled 10cm withcolor \MPcolor{trans};

    fill fullsquare xyscaled (15cm, 15cm)
      withshademethod "linear"
      withshadevector (0,1)
      % works
      withshadecolors (red,\MPcolor{blue})
      % fails
      %% withshadecolors (red,\MPcolor{trans})
      ;
  \stopMPcode
\stoptext

How to make transparent shadings work with the new mechanism?

Marco
___________________________________________________________________________________
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 via email to