PostScript solutions: Level 3 blends

Back to PostScript

Not everyone has a Level 3 printer, but they still want access to Level 3 functionality. I wrote a Level 2 process to create Level 3 graduated screens, including colors and angle. Of course, once written, it had to be tested. This one was a bit more complicated.

gsave
/gridang 0 def
0 1 5 {
  gsave
    0 1 5 {
    pop
    BeginEPSF
      nxBlendDict begin
      gsave
        [(blue) (white) (green) (yllw) (red)
        gridang 60 60 0 100 80 6 0 (none) (linear) (not) ] build
      grestore %rectfill
      /TimesNewRomanPS-BoldMT 10 selectfont
      30 10 moveto gridang 20 string cvs ( degrees) concatenate
      dup stringwidth pop 2 div neg 0 rmoveto
      show
      72 0 translate
      end
      gridang 10 add /gridang exch def
    } for
    grestore
  EndEPSF
  0 72 translate
} for
grestore