[NTG-context] shading with stitching functions

Mojca Miklavec mojca.miklavec.lists at gmail.com
Wed Dec 27 17:43:41 CET 2006

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:

{1cm}{rgb(0cm)=(1,0,0); color(2cm)=(green); color(4cm)=(blue)}

(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.)


More information about the ntg-context mailing list