home *** CD-ROM | disk | FTP | other *** search
/ MacAdvocate 2 / apple-mac-advocate-ii-fall-1997.iso / mac / MacOS / Other Installers / LaserWriter 8.4.1 Installer / LaserWriter Disk 1 / PL.CommonRsrc / PL.CommonRsrc.rsrc / PS_-8171 < prev    next >
Encoding:
Text File  |  1996-09-10  |  2.6 KB  |  203 lines

  1. %%BeginFile: lw8_level2_colorspace-2.0
  2. /initializepage
  3. {
  4. mT $m currentmatrix mTS concatmatrix pop
  5. /pm save store mT concat
  6. $c setcolorspace
  7. }bd
  8. /G
  9. {
  10. mark currentcolor counttomark dup 2 add 1 roll cleartomark
  11. {0{}0{dup dup}{0 0 0 4 -1 roll 1 exch sub}}
  12. exch get exec setcolor
  13. }bd
  14. /setcolor where{pop/:F/setcolor ld/:F1/setcolor ld/:F4/setcolor ld}if
  15. /:Fx
  16. {
  17. setcolor
  18. pop
  19. }bd
  20. /:ss{/$c xdf $c setcolorspace}bd
  21. /resourcestatus where
  22. {
  23. pop
  24. /ColorRendering/ProcSet resourcestatus
  25. {
  26. pop pop T
  27. }{
  28. F
  29. }ifelse
  30. }{
  31. F
  32. }ifelse
  33. dup startnoload
  34. 3 dict begin
  35. /GetHalftoneName
  36. {
  37. currenthalftone dup
  38. /HalftoneName known
  39. {
  40. /HalftoneName get
  41. }{
  42. pop/none
  43. }ifelse
  44. }bd
  45. /GetPageDeviceName
  46. {
  47. currentpagedevice dup
  48. /PageDeviceName known
  49. {
  50. /PageDeviceName get
  51. dup//null eq
  52. {
  53. pop/none
  54. }ifelse
  55. }{
  56. pop/none
  57. }ifelse
  58. }bd
  59. /GetSubstituteCRD
  60. {
  61. pop/DefaultColorRendering
  62. }bd
  63. /ColorRendering currentdict
  64. end
  65. /defineresource where
  66. {
  67. pop
  68. /ProcSet defineresource pop
  69. }{
  70. pop pop
  71. }ifelse
  72. endnoload
  73. /findcolorrendering where{
  74. pop T
  75. }{
  76. F
  77. }ifelse
  78. dup startnoload
  79. userdict/findcolorrendering
  80. {
  81. /ColorRendering/ProcSet findresource begin
  82. mark
  83. {
  84. GetHalftoneName
  85. (.)
  86. GetPageDeviceName
  87. (.)
  88. 5 index
  89. 0
  90. 5 -1 1{
  91. index
  92. dup type dup/nametype ne exch/stringtype ne and{
  93. //errordict/typecheck get exec
  94. }if
  95. length add
  96. }for
  97. string
  98. 6 1 roll
  99. 5 index
  100. 5{
  101. exch 1 index cvs
  102. length 1 index length 1 index sub getinterval
  103. }repeat
  104. pop
  105. cvn
  106. dup/ColorRendering resourcestatus{
  107. pop pop//true
  108. }{
  109. pop 1 index GetSubstituteCRD//false
  110. }ifelse
  111. 4 2 roll pop pop
  112. end
  113. }stopped{
  114. cleartomark
  115. end
  116. //$error/command/findcolorrendering put
  117. stop
  118. }if
  119. }bind put
  120. endnoload
  121. /$r Z
  122. /currentcolorrendering where
  123. {
  124. pop/$r currentcolorrendering def
  125. }if
  126. /:dr{$r setcolorrendering}bd
  127. /$cs Z
  128. /:sc{$cs :ss}bd
  129. /:rg{devr :ss}bd
  130. /:sgl
  131. {
  132. currentglobal T setglobal
  133. }bd
  134. /:dc
  135. {
  136. exch setglobal
  137. /$cs xdf
  138. }bd
  139. /:fCRD
  140. {
  141. dup length 9 add string
  142. 2 copy cvs
  143. length 2 copy
  144. (.Mac.none)putinterval
  145. pop
  146. cvn
  147. /ColorRendering 2 copy
  148. resourcestatus
  149. {
  150. pop pop
  151. findresource
  152. exch pop
  153. setcolorrendering
  154. }{
  155. pop pop
  156. findcolorrendering
  157. pop
  158. /ColorRendering 2 copy
  159. resourcestatus
  160. {
  161. pop pop
  162. findresource setcolorrendering
  163. }{
  164. pop pop
  165. }ifelse
  166. }ifelse
  167. }bd
  168. /$currentcolordict
  169. 5 dict begin
  170. /DeviceGray/currentgray ld
  171. /DeviceRGB/currentrgbcolor ld
  172. /DeviceCMYK/currentcmykcolor where{pop/currentcmykcolor ld}{pop}ifelse
  173. /CIEBasedABC/currentrgbcolor ld
  174. /CIEBasedA/currentgray ld
  175. currentdict end
  176. def
  177. /:ckcs
  178. {
  179. currentcolorspace $c ne
  180. {
  181. currentcolorspace dup 0 get/Pattern eq
  182. {
  183. 1 get
  184. $c eq
  185. not
  186. }{
  187. pop T
  188. }ifelse
  189. {
  190. $currentcolordict $c 0 get known
  191. {
  192. $currentcolordict $c 0 get get exec
  193. }if
  194. $c setcolorspace
  195. $currentcolordict $c 0 get known
  196. {
  197. setcolor
  198. }if
  199. }if
  200. }if
  201. }bd
  202. %%EndFile
  203.