Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1453

Re: Rainbow printing

From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.postscript
Subject Re: Rainbow printing
Organization Decebal Computing
References <87fvvfde6v.fsf@Aspire.decebal.nl> <2ab35483-9e59-4696-875b-b718c82385ea@googlegroups.com> <874nbvd53k.fsf@Aspire.decebal.nl> <87txjvljga.fsf@ixod.org>
Date 2013-07-16 01:48 +0200
Message-ID <87zjtnbd0x.fsf@Aspire.decebal.nl> (permalink)

Show all headers | View raw


Op maandag 15 jul 2013 21:19 CEST schreef Mark Carroll:

> Cecil Westerhof <Cecil@decebal.nl> writes:
>
>> But then only for the object drawn, for example some text.
>
> This is exactly what clipping paths are for.

I tried the following:
    %!PS-Adobe-3.0 EPSF-3.0
    %%BoundingBox: 0 0 300 450
    
    /URWChanceryL findfont 50 scalefont setfont
    
    /clipBox {
        4 dict begin
            /dy exch def
            /dx exch def
    
            moveto
            dx 0 rlineto
            0 dy rlineto
            dx neg 0 rlineto
            closepath
            gsave
                clip
                newpath
                showText
            grestore
    } def
    
    /showText {
        100 60 moveto
        (Rainbow) show
    } def
    
    1 1 1 setrgbcolor
    0 0  300 450 rectfill
    
    1 0 0 setrgbcolor
    100 88 175 8 clipBox
    1 0.5 0 setrgbcolor
    100  82 175  6 clipBox
    1 1 0 setrgbcolor
    100  76 175  6 clipBox
    0 1 0 setrgbcolor
    100  70 175  6 clipBox
    0 0 1 setrgbcolor
    100  64 175  6 clipBox
    .31 0 .5 setrgbcolor
    100  58 175  6 clipBox
    .94 .5 .94 setrgbcolor
    100 50  175  8 clipBox
    showpage

But Rainbow is completely in violet. When I put the last clipBox in
comment, then the whole word is in indigo. What am I doing wrong here?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Rainbow printing Cecil Westerhof <Cecil@decebal.nl> - 2013-07-15 17:40 +0200
  Re: Rainbow printing abeddie <abeddie@hotmail.com> - 2013-07-15 09:54 -0700
    Re: Rainbow printing Cecil Westerhof <Cecil@decebal.nl> - 2013-07-15 20:56 +0200
      Re: Rainbow printing Mark Carroll <mtbc@bcs.org> - 2013-07-15 20:19 +0100
        Re: Rainbow printing Cecil Westerhof <Cecil@decebal.nl> - 2013-07-16 01:48 +0200
          Re: Rainbow printing Cecil Westerhof <Cecil@decebal.nl> - 2013-07-17 11:36 +0200
  Re: Rainbow printing Helge Blischke <h.blischke@acm.org> - 2013-07-15 18:56 +0200
  Re: Rainbow printing Michael Unger <spam.to.unger@spamgourmet.com> - 2013-07-15 19:06 +0200
    Re: Rainbow printing Michael Unger <spam.to.unger@spamgourmet.com> - 2013-07-15 22:07 +0200
  Re: Rainbow printing John Deubert <john@acumentraining.com> - 2013-07-16 16:34 -0700
    Re: Rainbow printing Cecil Westerhof <Cecil@decebal.nl> - 2013-07-17 09:10 +0200
  Re: Rainbow printing sjprouty3765@gmail.com - 2013-07-17 15:08 -0700
    Re: Rainbow printing Cecil Westerhof <Cecil@decebal.nl> - 2013-07-18 05:22 +0200
  Re: Rainbow printing luser- -droog <mijoryx@yahoo.com> - 2013-07-17 15:22 -0700
    Re: Rainbow printing luser- -droog <mijoryx@yahoo.com> - 2013-07-17 16:55 -0700
    Re: Rainbow printing Cecil Westerhof <Cecil@decebal.nl> - 2013-07-18 05:22 +0200

csiph-web