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


Groups > comp.lang.postscript > #1444 > unrolled thread

Rainbow printing

Started byCecil Westerhof <Cecil@decebal.nl>
First post2013-07-15 17:40 +0200
Last post2013-07-18 05:22 +0200
Articles 16 — 8 participants

Back to article view | Back to comp.lang.postscript


Contents

  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

#1444 — Rainbow printing

FromCecil Westerhof <Cecil@decebal.nl>
Date2013-07-15 17:40 +0200
SubjectRainbow printing
Message-ID<87fvvfde6v.fsf@Aspire.decebal.nl>
I would like to print things with a rainbow stripe. So the top would
be red, the bottom would be violet and the other colours would be in
between. Is it possible to do this?

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

[toc] | [next] | [standalone]


#1446

Fromabeddie <abeddie@hotmail.com>
Date2013-07-15 09:54 -0700
Message-ID<2ab35483-9e59-4696-875b-b718c82385ea@googlegroups.com>
In reply to#1444
On Monday, July 15, 2013 11:40:24 AM UTC-4, Cecil Westerhof wrote:
> I would like to print things with a rainbow stripe. So the top would
> 
> be red, the bottom would be violet and the other colours would be in
> 
> between. Is it possible to do this?
> 
> 
> 
> -- 
> 
> Cecil Westerhof
> 
> Senior Software Engineer
> 
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Looking into shading dictionaries example included:

%!
100 400 300 200 rectclip
<<
  /ShadingType 2
  /ColorSpace [ /DeviceRGB ]
  /Coords [100 400 400 600 ]
  /Function
  <<
    /FunctionType 2
    /Domain [ 0 1 ]
    /C0 [ 1 0 0 ]
    /C1 [ .5 1 .5 ]
    /N 1
  >>
>>
shfill
showpage

[toc] | [prev] | [next] | [standalone]


#1450

FromCecil Westerhof <Cecil@decebal.nl>
Date2013-07-15 20:56 +0200
Message-ID<874nbvd53k.fsf@Aspire.decebal.nl>
In reply to#1446
Op maandag 15 jul 2013 18:54 CEST schreef abeddie@hotmail.com:

> On Monday, July 15, 2013 11:40:24 AM UTC-4, Cecil Westerhof wrote:
>> I would like to print things with a rainbow stripe. So the top
>> would
>>
>> be red, the bottom would be violet and the other colours would be
>> in
>>
>> between. Is it possible to do this?
>>
>>
>>
>> -- 
>>
>> Cecil Westerhof
>>
>> Senior Software Engineer
>>
>> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
>
> Looking into shading dictionaries example included:
>
> %!
> 100 400 300 200 rectclip
> <<
> /ShadingType 2
> /ColorSpace [ /DeviceRGB ]
> /Coords [100 400 400 600 ]
> /Function
> <<
> /FunctionType 2
> /Domain [ 0 1 ]
> /C0 [ 1 0 0 ]
> /C1 [ .5 1 .5 ]
> /N 1
>>>
>>>
> shfill
> showpage

That gives a gradient fill. I mean more something like:
    %!PS-Adobe-3.0 EPSF-3.0
    %%BoundingBox: 0 0 300 450

    1 1 1 setrgbcolor
    0 0 300 450 rectfill
    1 0 0 setrgbcolor
    100 350 100 50 rectfill
    1 0.5 0 setrgbcolor
    100 300 100 50 rectfill
    1 1 0 setrgbcolor
    100 250 100 50 rectfill
    0 1 0 setrgbcolor
    100 200 100 50 rectfill
    0 0 1 setrgbcolor
    100 150 100 50 rectfill
    .31 0 .5 setrgbcolor
    100 100 100 50 rectfill
    .94 .5 .94 setrgbcolor
    100 50 100 50 rectfill
    showpage

But then only for the object drawn, for example some text.

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

[toc] | [prev] | [next] | [standalone]


#1451

FromMark Carroll <mtbc@bcs.org>
Date2013-07-15 20:19 +0100
Message-ID<87txjvljga.fsf@ixod.org>
In reply to#1450
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.

Mark

[toc] | [prev] | [next] | [standalone]


#1453

FromCecil Westerhof <Cecil@decebal.nl>
Date2013-07-16 01:48 +0200
Message-ID<87zjtnbd0x.fsf@Aspire.decebal.nl>
In reply to#1451
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

[toc] | [prev] | [next] | [standalone]


#1465

FromCecil Westerhof <Cecil@decebal.nl>
Date2013-07-17 11:36 +0200
Message-ID<87y595a5pv.fsf@Aspire.decebal.nl>
In reply to#1453
Op dinsdag 16 jul 2013 01:48 CEST schreef Cecil Westerhof:

> 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?

This does what I want (only the red and violet stripe should be
bigger):
    %!PS-Adobe-3.0 EPSF-3.0
    %%BoundingBox: 0 0 300 200

    /URWChanceryL findfont 50 scalefont setfont

    /showText {
        100 60 moveto
        (Rainbow) show
    } def

    0 setgray
    0 0  300 200 rectfill

    gsave
        100 88 175 8 rectclip
        1 0 0 setrgbcolor
        showText
    grestore
    gsave
        100 82 175 6 rectclip
        1 0.5 0 setrgbcolor
        showText
    grestore
    gsave
        100 76 175 6 rectclip
        1 1 0 setrgbcolor
        showText
    grestore
    gsave
        100 70 175 6 rectclip
        0 1 0 setrgbcolor
        showText
    grestore
    gsave
        100 64 175 6 rectclip
        0 0 1 setrgbcolor
        showText
    grestore
    gsave
        100 58 175 6 rectclip
        .31 0 .5 setrgbcolor
        showText
    grestore
    gsave
        100 50 175 8 rectclip
        .94 .5 .94 setrgbcolor
        showText
    grestore

Is this the best way to do it? What if the showText function becomes
very complex?

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

[toc] | [prev] | [next] | [standalone]


#1447

FromHelge Blischke <h.blischke@acm.org>
Date2013-07-15 18:56 +0200
Message-ID<b4inu2Fl89lU1@mid.individual.net>
In reply to#1444
Cecil Westerhof wrote:

> I would like to print things with a rainbow stripe. So the top would
> be red, the bottom would be violet and the other colours would be in
> between. Is it possible to do this?
> 

It can be done using the shfill operator which requires a shading dictionary 
as the only parameter on the operand stack.

See the PLRM section 4.9.3 "Shading Patterns" for the details.

Helge

[toc] | [prev] | [next] | [standalone]


#1448

FromMichael Unger <spam.to.unger@spamgourmet.com>
Date2013-07-15 19:06 +0200
Message-ID<b4ior8FlefmU1@mid.individual.net>
In reply to#1444
On 2013-07-15 17:40, "Cecil Westerhof" wrote:

> I would like to print things with a rainbow stripe. So the top would
> be red, the bottom would be violet and the other colours would be in
> between. Is it possible to do this?

"smooth shading" with a few sub-sections? "red" to "orange" to "yellow"
to "green" and so forth? PostScript operator "shfill" combined with a
"shading dictionary"; see the fine PLRM [1], section 8.2, "Operator
Details".

Michael


[1] <http://www.adobe.com/products/postscript/pdfs/PLRM.pdf>

-- 
Real names enhance the probability of getting real answers.
My e-mail account at DECUS Munich is no longer valid.

[toc] | [prev] | [next] | [standalone]


#1452

FromMichael Unger <spam.to.unger@spamgourmet.com>
Date2013-07-15 22:07 +0200
Message-ID<b4j3epFnr54U1@mid.individual.net>
In reply to#1448
On 2013-07-15 19:06, "Michael Unger" wrote:

> "smooth shading" with a few sub-sections? [...]

I had to search quite hard to find a reference to an Adobe Technical
Note (TN #5600, [2]) on "smooth shading", because it is hidden very well
(aka "archived") on Adobe's web site ...

Michael


[2]
<http://partners.adobe.com/public/developer/en/ps/sdk/TN5600.SmoothShading.pdf>
[3]
<http://partners.adobe.com/public/developer/ps/sdk/index_archive.html#plbsc>

-- 
Real names enhance the probability of getting real answers.
My e-mail account at DECUS Munich is no longer valid.

[toc] | [prev] | [next] | [standalone]


#1462

FromJohn Deubert <john@acumentraining.com>
Date2013-07-16 16:34 -0700
Message-ID<2013071616344532779-john@acumentrainingcom>
In reply to#1444
On 2013-07-15 15:40:24 +0000, Cecil Westerhof said:

> I would like to print things with a rainbow stripe. So the top would
> be red, the bottom would be violet and the other colours would be in
> between. Is it possible to do this?

I'd be inclined to do this with a level 1 technique, using sethsbcolor:

% ========== cut here =============

/center { 300 400 } def

/innerRadius 100 def
/outerRadius 150 def

/innerColor .8 def	% Purple, close enough
/outerColor 0 def	% red

/steps 100 def

/deltaR outerRadius innerRadius sub steps div def
/deltaColor outerColor innerColor sub steps div def


/color innerColor def
deltaR setlinewidth

innerRadius deltaR outerRadius
{
	center 3 -1 roll 0 180 arc
	color 1 1 sethsbcolor
	stroke
	/color color deltaColor add def
} for

showpage

% ========== cut here =============

Not technically as smooth (or nearly as cool) as using smooth shading, 
but gets the job done.

- John


-- 
========
John Deubert
Acumen Training
PostScript & PDF Engineering Classes & Consulting
www.acumentraining.com

Learn PostScript programming techniques
Read the free Acumen Journal
acumentraining.com/acumenjournal.html

[toc] | [prev] | [next] | [standalone]


#1463

FromCecil Westerhof <Cecil@decebal.nl>
Date2013-07-17 09:10 +0200
Message-ID<878v15br1y.fsf@Aspire.decebal.nl>
In reply to#1462
Op woensdag 17 jul 2013 01:34 CEST schreef John Deubert:

> On 2013-07-15 15:40:24 +0000, Cecil Westerhof said:
>
>> I would like to print things with a rainbow stripe. So the top
>> would be red, the bottom would be violet and the other colours
>> would be in between. Is it possible to do this?
>
> I'd be inclined to do this with a level 1 technique, using
> sethsbcolor:
>
> % ========== cut here =============
>
> /center { 300 400 } def
>
> /innerRadius 100 def
> /outerRadius 150 def
>
> /innerColor .8 def	% Purple, close enough
> /outerColor 0 def	% red
>
> /steps 100 def
>
> /deltaR outerRadius innerRadius sub steps div def
> /deltaColor outerColor innerColor sub steps div def
>
>
> /color innerColor def
> deltaR setlinewidth
>
> innerRadius deltaR outerRadius
> {
> 	center 3 -1 roll 0 180 arc
> 	color 1 1 sethsbcolor
> 	stroke
> 	/color color deltaColor add def
> } for
>
> showpage
>
> % ========== cut here =============

This draws an actual rainbow. Nice, but not what I meant. What I want:
I draw the word rainbow and the top of the word is red and the bottom
is violet and between the other colours are used.

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

[toc] | [prev] | [next] | [standalone]


#1469

Fromsjprouty3765@gmail.com
Date2013-07-17 15:08 -0700
Message-ID<d577ad16-3fef-41af-b4d8-577cbc5660e1@googlegroups.com>
In reply to#1444
On Monday, July 15, 2013 8:40:24 AM UTC-7, Cecil Westerhof wrote:
> I would like to print things with a rainbow stripe. So the top would
> 
> be red, the bottom would be violet and the other colours would be in
> 
> between. Is it possible to do this?
> 
> 
> 
> -- 
> 
> Cecil Westerhof
> 
> Senior Software Engineer
> 
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof


Here is a way to do it:

%!

gsave

/Helvetica-Bold 80 selectfont
newpath
100 650 moveto
(RAINBOW) true charpath
clip

1 0 0 setrgbcolor
100 700 2000 10 rectfill
1 0.5 0 setrgbcolor
100 690 2000 10 rectfill
1 1 0 setrgbcolor
100 680 2000 10 rectfill
0 1 0 setrgbcolor
100 670 2000 10 rectfill
0 0 1 setrgbcolor
100 660 2000 10 rectfill
.31 0 .5 setrgbcolor
100 650 2000 10 rectfill

grestore

showpage

[toc] | [prev] | [next] | [standalone]


#1474

FromCecil Westerhof <Cecil@decebal.nl>
Date2013-07-18 05:22 +0200
Message-ID<87k3komu1q.fsf@Aspire.decebal.nl>
In reply to#1469
Op donderdag 18 jul 2013 00:08 CEST schreef sjprouty:

> On Monday, July 15, 2013 8:40:24 AM UTC-7, Cecil Westerhof wrote:
>> I would like to print things with a rainbow stripe. So the top
>> would
>>
>> be red, the bottom would be violet and the other colours would be
>> in
>>
>> between. Is it possible to do this?
>>
>>
>>
>> -- 
>>
>> Cecil Westerhof
>>
>> Senior Software Engineer
>>
>> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
>
>
> Here is a way to do it:
>
> %!
>
> gsave
>
> /Helvetica-Bold 80 selectfont
> newpath
> 100 650 moveto
> (RAINBOW) true charpath
> clip
>
> 1 0 0 setrgbcolor
> 100 700 2000 10 rectfill
> 1 0.5 0 setrgbcolor
> 100 690 2000 10 rectfill
> 1 1 0 setrgbcolor
> 100 680 2000 10 rectfill
> 0 1 0 setrgbcolor
> 100 670 2000 10 rectfill
> 0 0 1 setrgbcolor
> 100 660 2000 10 rectfill
> .31 0 .5 setrgbcolor
> 100 650 2000 10 rectfill
>
> grestore
>
> showpage

I did find a way to do it, but this one is much better. Thanks.

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

[toc] | [prev] | [next] | [standalone]


#1470

Fromluser- -droog <mijoryx@yahoo.com>
Date2013-07-17 15:22 -0700
Message-ID<96e38023-55f7-4205-8e6f-662ffc62812c@googlegroups.com>
In reply to#1444
On Monday, July 15, 2013 10:40:24 AM UTC-5, Cecil Westerhof wrote:
> I would like to print things with a rainbow stripe. So the top would
> be red, the bottom would be violet and the other colours would be in
> between. Is it possible to do this?

I've got some code for grayscale gradients which could be 
extended to color, here:

http://stackoverflow.com/a/7900346/733077

[toc] | [prev] | [next] | [standalone]


#1471

Fromluser- -droog <mijoryx@yahoo.com>
Date2013-07-17 16:55 -0700
Message-ID<08565253-2408-466b-b9db-3f9f041c5c90@googlegroups.com>
In reply to#1470
On Wednesday, July 17, 2013 5:22:48 PM UTC-5, luser- -droog wrote:
> On Monday, July 15, 2013 10:40:24 AM UTC-5, Cecil Westerhof wrote:
> 
> > I would like to print things with a rainbow stripe. So the top would
> > be red, the bottom would be violet and the other colours would be in
> > between. Is it possible to do this?
> 
> I've got some code for grayscale gradients which could be 
> extended to color, here:
> 
> http://stackoverflow.com/a/7900346/733077

I think this code illustrates some of what I was trying
to show you in the other thread. Namely, that sometimes
the inner procedures don't need to be so isolated.
Since the main entry point executes a 
`gsave 
   ? ? translate
   ? ? scale
   ... 
grestore`,
the inner procedures can directly alter the graphics 
state to achieve combined special-effects, based on 
the interaction of different tweaks to the gstate.

In particular, the /poly procedure can draw a general
polygon very simply, with lineto and rotate, since it
can assume that we're already translated to the center.

/dograd is probably the sore spot here.
It should be rewritten to use variables. As an outer
procedure, the speed gain from the no-variable style
is minimal, and unnecessarily obfuscatory. But, read
the comments! That's what they're there for. 
I've tried to annotate how the computation progresses
with the stack-shorthand.

/dograd is really just assembling the arguments for
/agrad, the workhorse. All the other blocks are various
interchangeable modules that can interact together.

%!

/box { % x y w h
    4 2 roll moveto % w h
    1 index 0 rlineto % w h
    0 exch rlineto % w
    neg 0 rlineto %
    closepath
} def

/ygrad { % x y w h n
    2 dict begin % x y w h n
    /n exch def % x y w h
    /dn 1 n div def % x y w h
    gsave
        4 2 roll translate % w h  %translate to x,y
        dup 2 div 0 exch translate % w h  %translate to 0,h/2
        scale %           %scale 1,1 to w,h
        0 setgray
        n {
            0 -0.5 1 1 box fill
            1 dn dn exp scale
            currentgray dn add setgray
        } repeat
    grestore
    end
} def

{
    100 100 100 600 5 ygrad
    200 100 100 600 7 ygrad
    300 100 100 600 11 ygrad
    400 100 100 600 18 ygrad
    showpage
} pop%exec

/poly { % n
    0.5 0 moveto
    { ? rotate 0.5 0 lineto } % n proc
    dup 0 360 4 index div put % n {360/n...}
    repeat
    closepath
} def

% num-slices shapeproc matrix grayproc  agrad  -
% repeatedly (fill shape, concat matrix, transform currentgray)
/agrad {
    3 dict begin /gray exch def /mat exch def /shape exch def
    ({ //shape exec //mat concat currentgray //gray exec setgray })
    token pop exch pop end bind repeat
} def

/shapes [
    { -0.5 -0.5 1 1 box fill }   %box shape
    { 0 0 0.5 0 360 arc fill }   %circle shape
    { 0 0 0.5 0 180 arc fill }   %fan shape
    { 5 poly fill } %pentagon
    { 6 poly fill } %hexagon
    ] def

/mats [
    {1 index 2 exch div 1 exch sub   dup matrix scale } %pyramid matrix
    {1 index 2 exch div 1 exch sub   1 matrix scale } %horizontal matrix
    {1 index 2 exch div 1 exch sub   1 exch matrix scale } %vertical matrix
    ] def

% mat-no shape-no gray0 grayF n x y w h  dograd  -
/dograd {
    gsave
        4 2 roll translate % m sh g0 gF n w h
        scale % m sh g0 gF n
        3 1 roll % m sh n g0 gF
        1 index sub 2 index div % m sh n g0 (gF-g0)/n
        [ exch /add cvx ] cvx % m sh n g0 grayproc
        3 1 roll setgray % m sh grayproc n
        3 -1 roll shapes exch get % m gray n shape
        4 -1 roll mats exch get exec % gray n shape mat
        4 -1 roll %n shape matrix gray
        agrad
    grestore
} def

%mat shape g0 gF n x y w h
0 4 .7 .1 20 300 400 600 800 dograd

0 0 0 1 10 100 650 200 200 dograd
1 1 0 1 20 300 650 200 200 dograd
2 2 .5 1 30 500 650 200 200 dograd

0 3 1 0 40 100 400 200 200 dograd
1 4 1 .5 50 300 400 200 200 dograd
2 1 .5 0 60 500 400 200 200 dograd

0 2 .1 .9 10 100 150 200 200 dograd
1 3 .2 .8 20 300 150 200 200 dograd
2 4 .3 .7 30 500 150 200 200 dograd

showpage

[toc] | [prev] | [next] | [standalone]


#1473

FromCecil Westerhof <Cecil@decebal.nl>
Date2013-07-18 05:22 +0200
Message-ID<87fvvcmu0j.fsf@Aspire.decebal.nl>
In reply to#1470
Op donderdag 18 jul 2013 00:22 CEST schreef luser:

> On Monday, July 15, 2013 10:40:24 AM UTC-5, Cecil Westerhof wrote:
>> I would like to print things with a rainbow stripe. So the top
>> would be red, the bottom would be violet and the other colours
>> would be in between. Is it possible to do this?
>
> I've got some code for grayscale gradients which could be 
> extended to color, here:
>
> http://stackoverflow.com/a/7900346/733077

A very interesting read. Thanks.

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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web