ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MP & text transparency
@ 2017-04-24 13:11 Procházka Lukáš Ing.
  2017-04-24 13:39 ` Thomas A. Schmitz
  0 siblings, 1 reply; 4+ messages in thread
From: Procházka Lukáš Ing. @ 2017-04-24 13:11 UTC (permalink / raw)
  To: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

Hello,

suppose having the following code:

----
\startuseMPgraphic{T}
   newpath rc; rc := fullsquare xyscaled (50mm, 50mm);
   color col; col := (1.,.1,.1);
   draw rc withpen pencircle scaled (2.5mm) withcolor %col;
                                                      transparent(1, .4, col);

   draw thelabel(btex\setupbodyfont[sans,35mm] Test etex, (80mm, 50mm))
     withcolor %col
               transparent(1, .4, col)
     ;
\stopuseMPgraphic

\defineoverlay[T][\useMPgraphic{T}]

\setupbackgrounds[page][background={foreground,T}]

\startTEXpage[width=200mm,height=200mm]
\stopTEXpage
----

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


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@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

[-- Attachment #2: MP-Trans.mkiv --]
[-- Type: application/octet-stream, Size: 559 bytes --]

\startuseMPgraphic{T}
  newpath rc; rc := fullsquare xyscaled (50mm, 50mm);
  color col; col := (1.,.1,.1);
  draw rc withpen pencircle scaled (2.5mm) withcolor %col;
                                                     transparent(1, .4, col);

  draw thelabel(btex\setupbodyfont[sans,35mm] Test etex, (80mm, 50mm))
    withcolor %col
              transparent(1, .4, col)
    ;
\stopuseMPgraphic

\defineoverlay[T][\useMPgraphic{T}]

\setupbackgrounds[page][background={foreground,T}]

\startTEXpage[width=200mm,height=200mm]
\stopTEXpage

[-- Attachment #3: MP-Trans.pdf --]
[-- Type: application/pdf, Size: 5009 bytes --]

[-- Attachment #4: Type: text/plain, Size: 492 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-24 17:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 13:11 MP & text transparency Procházka Lukáš Ing.
2017-04-24 13:39 ` Thomas A. Schmitz
2017-04-24 14:40   ` Procházka Lukáš Ing.
2017-04-24 17:36   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).