From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45213 Path: news.gmane.org!not-for-mail From: Renaud Aubin Newsgroups: gmane.comp.tex.context Subject: Color rendering & transparency with metapost Date: Sat, 01 Nov 2008 01:38:00 +0100 Message-ID: <490BA4E8.1010208@nibua-r.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225495923 16970 80.91.229.12 (31 Oct 2008 23:32:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2008 23:32:03 +0000 (UTC) To: Mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Nov 01 00:33:04 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Kw3UF-0001Jx-Gq for gctc-ntg-context-518@m.gmane.org; Sat, 01 Nov 2008 00:33:03 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 146D81FC39; Sat, 1 Nov 2008 00:31:55 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07220-03; Sat, 1 Nov 2008 00:30:54 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 975331FB57; Sat, 1 Nov 2008 00:30:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AE6F11FB57 for ; Sat, 1 Nov 2008 00:30:52 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07300-02 for ; Sat, 1 Nov 2008 00:30:17 +0100 (CET) Original-Received: from 2.mail-out.ovh.net (2.mail-out.ovh.net [91.121.26.226]) by ronja.ntg.nl (Postfix) with SMTP id 824CD1FB39 for ; Sat, 1 Nov 2008 00:30:17 +0100 (CET) Original-Received: (qmail 13768 invoked by uid 503); 31 Oct 2008 23:48:37 -0000 Original-Received: from gw2.ovh.net (HELO mail170.ha.ovh.net) (213.251.189.202) by 2.mail-out.ovh.net with SMTP; 31 Oct 2008 23:48:37 -0000 Original-Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 31 Oct 2008 23:30:10 -0000 Original-Received: from cha78-4-88-178-141-145.fbx.proxad.net (HELO ?192.168.78.1?) (aubin@nibua-r.org@88.178.141.145) by ns0.ovh.net with SMTP; 31 Oct 2008 23:30:08 -0000 User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) X-Ovh-Tracer-Id: 10736581513075692301 X-Ovh-Remote: 88.178.141.145 (cha78-4-88-178-141-145.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|H 0.5/N X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:45213 Archived-At: 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 ___________________________________________________________________________________