From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/32308 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: shading with stitching functions Date: Wed, 27 Dec 2006 17:43:41 +0100 Message-ID: <6faad9f00612270843n5a7ef120t10e7196654274bbd@mail.gmail.com> References: <6faad9f00612261448y18a9a2ceoe5b8293c4edc8153@mail.gmail.com> <45926EB1.2070903@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1167237863 17733 80.91.229.10 (27 Dec 2006 16:44:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Dec 2006 16:44:23 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 27 17:44:21 2006 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 dough.gmane.org with esmtp (Exim 4.50) id 1Gzbt0-0000fV-KE for gctc-ntg-context-518@m.gmane.org; Wed, 27 Dec 2006 17:44:14 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 57B121FC27; Wed, 27 Dec 2006 17:42:06 +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 08772-03-3; Wed, 27 Dec 2006 17:41:59 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CB3BE1FB71; Wed, 27 Dec 2006 17:41:58 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BCB181FB5A for ; Wed, 27 Dec 2006 17:41:56 +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 08756-10-8 for ; Wed, 27 Dec 2006 17:41:49 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by ronja.ntg.nl (Postfix) with SMTP id 833751FA73 for ; Wed, 27 Dec 2006 17:41:49 +0100 (CET) Original-Received: by nf-out-0910.google.com with SMTP id l37so4552122nfc for ; Wed, 27 Dec 2006 08:43:41 -0800 (PST) Original-Received: by 10.49.20.14 with SMTP id x14mr5813048nfi.1167237821523; Wed, 27 Dec 2006 08:43:41 -0800 (PST) Original-Received: by 10.48.209.2 with HTTP; Wed, 27 Dec 2006 08:43:41 -0800 (PST) Original-To: "mailing list for ConTeXt users" In-Reply-To: <45926EB1.2070903@gmx.net> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:32308 Archived-At: On 12/27/06, Peter Rolf wrote: > Hi Mojca, > > this is also on my wishlist (and christmas is over). Currently I use > several color gradients in a row, to simulate the same effect. But sadly > this way is too viewer dependent (rendering is a matter of luck with > every new version), not to mention the big size. So if there would be a > cleaner solution, I would be a happy man. > > I'm willing to help, but I haven't looked into specials yet. Give me > some time for reading and some more time for understanding... ;) With Hans's hint I finally got some kind of result. However, the numbers in the stream seem to influence the colors, but not in the way I want them to. I have to do some further explorations. Does anyone know how to convert PS to PDF without compression? Btw: TikZ supports such shadings, so if you don't necessary need a metapost graphic, you can take a look at it as well. Here's an example from the manual: \usemodule[tikz] \starttext \pgfdeclarehorizontalshading{myshadingA} {1cm}{rgb(0cm)=(1,0,0); color(2cm)=(green); color(4cm)=(blue)} \pgfuseshading{myshadingA} \stoptext (I've just found out that it uses another aproach for "sampled functions", perhaps I'll have more chances to figure out how to implement it that way.) Mojca