home *** CD-ROM | disk | FTP | other *** search
/ OneVision 3.03 / OneVision3.03.iso / Apps / OneVision.app / TMSPrintingPackage.1Vsys / setcustomcolorasseparation.ps < prev    next >
Encoding:
Text File  |  1996-11-12  |  835 b   |  22 lines

  1. %!
  2.     /findcmykcustomcolor {5 packedarray} def
  3.     /setcustomcolor
  4.     {    exch
  5.         [/Separation 3 -1 roll aload pop 5 1 roll /DeviceCMYK 5 1 roll
  6.          [5 1 roll 4 {4 index mul 4 1 roll} /repeat cvx 5 -1 /roll cvx /pop cvx] cvx bind]
  7.         setcolorspace
  8.         setcolor
  9.     } def
  10.     /sharedcustomcolorimagedict 8 dict def
  11.     /customcolorimage
  12.     {    gsave 1 setcustomcolor
  13.         currentcolorspace 0 get /DeviceCMYK eq
  14.         {[/Indexed /DeviceCMYK 4095 [4095 /div cvx currentcolor 4 {4 index mul 4 1 roll} /repeat cvx
  15.             5 -1 /roll cvx /pop cvx] cvx bind] setcolorspace 4095 setcolor
  16.         } if
  17.         sharedcustomcolorimagedict begin
  18.         currentcolorspace 0 get /Indexed eq {[currentcolorspace 2 get 0]} {[1 0]} ifelse false 1
  19.         {/ImageType /MultipleDataSources /Decode /DataSource /ImageMatrix /BitsPerComponent
  20.          /Height /Width} {exch def} forall currentdict end image grestore
  21.     } def
  22.