On 24.04.2017 15:11, Procházka Lukáš Ing. wrote:
The rectangle drawn is transparent, which is OK.
But the text "Test" is not, is it fully red; why?
How to specify text to be partially transparent, too?
TIA.
Best regards,
Lukas
Wouldn't it be better to define the transparency in ConTeXt and use it
for both text and drawing? Like this:
\definecolor [tred] [r=1,g=0,b=0,t=.2,a=1]
\startuseMPgraphic{T}
newpath rc; rc := fullsquare xyscaled (50mm, 50mm);
color col; col := (1.,.1,.1);
drawoptions(withcolor \MPcolor{tred}) ;
draw rc withpen pencircle scaled (2.5mm) ;
label(textext("\setupbodyfont[sans,35mm] \color[tred]{Test}"), (80mm,
50mm)) ;
\stopuseMPgraphic
\defineoverlay[T][\useMPgraphic{T}]
\setupbackgrounds[page][background={foreground,T}]
\startTEXpage[width=200mm,height=200mm]
\stopTEXpage
See ch. 8.2 of the metafun manual.
HTH
Thomas
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________