Hello,

that works fine, thank you!

Best regards,

Lukas


On Mon, 24 Apr 2017 15:39:56 +0200, Thomas A. Schmitz 
<thomas.schm...@uni-bonn.de> wrote:

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
___________________________________________________________________________________


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.      | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to