From: Renaud Aubin <aubin@nibua-r.org>
To: Mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Color rendering & transparency with metapost
Date: Sat, 01 Nov 2008 01:38:00 +0100 [thread overview]
Message-ID: <490BA4E8.1010208@nibua-r.org> (raw)
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
I have searched the ML without success, any idea ?
Regards,
Renaud
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2008-11-01 0:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-01 0:38 Renaud Aubin [this message]
2008-10-31 23:40 ` luigi scarso
2008-11-01 1:06 ` Renaud Aubin
2008-11-01 0:36 ` luigi scarso
2008-11-01 1:11 ` Renaud Aubin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=490BA4E8.1010208@nibua-r.org \
--to=aubin@nibua-r.org \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).