Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Herbert Voss Newsgroups: comp.lang.postscript Subject: Re: shfil Date: Tue, 13 Nov 2012 21:24:48 +0100 Organization: Freie Universitaet Berlin Lines: 51 Message-ID: References: <87vcdcl9dg.fsf@Compaq.site.inet> <705855b4-e077-47fc-a9a6-01d848283e00@googlegroups.com> <878va5jvb8.fsf@Compaq.site.inet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de Nj9rDEw78ki/2Lx/uc+vKwp9zNIA5vMYYH5if4lGJQhnBQQZKi59NKO5a0j/o4 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2 In-Reply-To: Xref: csiph.com comp.lang.postscript:1045 Am 13.11.2012 20:05, schrieb Ross Presser: > On Tuesday, November 13, 2012 11:59:13 AM UTC-5, Cecil Westerhof wrote: > >> That is exactly what I found and use. But there should be more >> functions (otherwise FunctionType would be redundant). I would like an >> explanation about those, but I can not find it. > > I couldn't find any explanation, but I did find an example using > /Functiontype 3 and one for type 4, also available with PSTricks: %!PS-Adobe-2.0 %%BoundingBox 0 0 285 285 % /ED { exch def } bind def /GTriangle { gsave /mtrx matrix currentmatrix def /colorA ED /colorB ED /colorC ED % save the colors /yA ED /xA ED % save the origin xA yA translate rotate % \psk@gangle /yB ED /xB ED /yC ED /xC ED % save other coordinates /ds [ % save data in a array 0 0 0 colorA aload pop % fd x y xr xg xb 0 xB xA sub yB yA sub colorB aload pop 0 xC xA sub yC yA sub colorC aload pop % 1 xC xB add yB colorA aload pop % for use with 4 points ABCD ] def newpath << /ShadingType 4 % single Gouraud /ColorSpace [ /DeviceRGB ] /DataSource ds >> shfill closepath mtrx setmatrix grestore} def 284.52744 0.0 142.26372 284.52744 0. 0.0 0.0 [ 0 0 1] [ 0 1 0] [ 1 0 0] GTriangle stroke Herbert