Debian Codegraph @

texmf-dist/dvips/tex-ps/separate.pro

raw
1 % [PL] Parametry separacji: [E] Separation parameters:
2 % Odkomentuj TYLKO JEDNO Uncomment EXACTLY ONE
3 % z poni/zszych ustawie/n: of the following settings:
4 %%%%%
5 % /color_sep 0 def % cyan
6 % /color_sep 1 def % magenta
7 % /color_sep 2 def % yellow
8 /color_sep 3 def % black
9 %%%%%
10 /ScreenFrequency 150 def
11 /Cangle 15 def
12 /Mangle 75 def
13 /Yangle 0 def
14 /Kangle 45 def
15 %
16 userdict begin /ori_setcmykcolor where {pop} {/ori_setcmykcolor /setcmykcolor
17 load def} ifelse /ori_setrgbcolor where {pop} {/ori_setrgbcolor /setrgbcolor
18 load def} ifelse /ori_setgray where {pop} {/ori_setgray /setgray load
19 def} ifelse /ori_colorimage where {pop} {/ori_colorimage /colorimage
20 load def} ifelse /ori_image where {pop} {/ori_image /image load def}
21 ifelse /ori_imagemask where {pop} {/ori_imagemask /imagemask load def}
22 ifelse /ori_fill where {pop} {/ori_fill /fill load def} ifelse /ori_eofill
23 where {pop} {/ori_eofill /eofill load def} ifelse /ori_stroke where
24 {pop} {/ori_stroke /stroke load def} ifelse /ori_show where {pop} {/ori_show
25 /show load def} ifelse /hax_setcmykcolor /ori_setcmykcolor load def
26 /maybe_black { 4 copy 1 sub abs epsilon le exch 0 sub abs epsilon le
27 and exch 0 sub abs epsilon le and exch 0 sub abs epsilon le and /if_delblack
28 exch def } def /my_fill {userdict begin if_delblack {newpath} {ori_fill}
29 ifelse end} def /my_eofill {userdict begin if_delblack {newpath} {ori_eofill}
30 ifelse end} def /my_stroke {userdict begin if_delblack {newpath} {ori_stroke}
31 ifelse end} def /my_show {userdict begin if_delblack {false charpath
32 currentpoint newpath moveto} {ori_show} ifelse end} def /eofill {userdict
33 begin my_eofill end} def /fill {userdict begin my_fill end} def /stroke
34 {userdict begin my_stroke end} def /show {userdict begin my_show end}
35 def /setcmykcolor {userdict begin /k_ exch def /y_ exch def /m_ exch
36 def /c_ exch def c_ m_ y_ k_ hax_setcmykcolor end} def /setgray {ori_setgray
37 currentcmykcolor setcmykcolor} def /setrgbcolor {ori_setrgbcolor currentcmykcolor
38 setcmykcolor} def /hax_image { dup type cvlit /dicttype eq { /ImageDict
39 exch def currentcolorspace dup length 1 eq ImageDict /ImageType get
40 1 eq and {0 get dup /DeviceRGB eq {/ncomp 3 def} if dup /DeviceGray
41 eq {/ncomp 1 def} if /DeviceCMYK eq {/ncomp 4 def} if ImageDict /BitsPerComponent
42 get 8 ne /ncomp 1 ne and {/ncomp 0 def} if } {pop /ncomp 0 def} ifelse
43 } { false 1 makeimagedict } ifelse ncomp 0 eq {ImageDict ori_image}
44 {hax_image_} ifelse } def /hax_colorimage { makeimagedict hax_image_
45 } def /makeimagedict { dup /ncomp exch def dup 4 eq {/DeviceCMYK setcolorspace}
46 if dup 3 eq {/DeviceRGB setcolorspace} if 1 eq {/DeviceGray setcolorspace}
47 if /ImageDict 7 dict def ImageDict begin {/MultipleDataSources true
48 def ncomp array astore} if /DataSource exch def /ImageMatrix exch def
49 /BitsPerComponent exch def /Height exch def /Width exch def /Decode
50 [ncomp {0 1} repeat] def /ImageType 1 def end } def /data_str 65532
51 string def /data_str_ 8192 string def /merge_multi4 { ImageDict /DataSource
52 get aload pop dup type cvlit /filetype eq { /fdatsrck exch def /fdatsrcy
53 exch def /fdatsrcm exch def /fdatsrcc exch def /datasrck {fdatsrck
54 data_str_ readstring pop} def /datasrcy {fdatsrcy data_str_ readstring
55 pop} def /datasrcm {fdatsrcm data_str_ readstring pop} def /datasrcc
56 {fdatsrcc data_str_ readstring pop} def } { /datasrck exch def /datasrcy
57 exch def /datasrcm exch def /datasrcc exch def } ifelse ImageDict /DataSource
58 { data_str 0 datasrcc {3 copy put pop 4 add} forall pop 1 datasrcm
59 {3 copy put pop 4 add} forall pop 2 datasrcy {3 copy put pop 4 add}
60 forall pop 3 datasrck {3 copy put pop 4 add} forall 3 sub 0 exch getinterval
61 } put } def /merge_multi3 { ImageDict /DataSource get aload pop dup
62 type cvlit /filetype eq { /fdatsrcb exch def /fdatsrcg exch def /fdatsrcr
63 exch def /datasrcb {fdatsrcb data_str_ readstring pop} def /datasrcg
64 {fdatsrcg data_str_ readstring pop} def /datasrcr {fdatsrcr data_str_
65 readstring pop} def } { /datasrcb exch def /datasrcg exch def /datasrcr
66 exch def } ifelse ImageDict /DataSource { data_str 0 datasrcr {3 copy
67 put pop 3 add} forall pop 1 datasrcg {3 copy put pop 3 add} forall
68 pop 2 datasrcb {3 copy put pop 3 add} forall 2 sub 0 exch getinterval
69 } put } def /i_Str 3 string def /O_Str 4 string def /UCR {0.5 mul}
70 def /BG {0.5 mul} def /min {1 index 1 index le {pop} {exch pop} ifelse}
71 def /max {1 index 1 index ge {pop} {exch pop} ifelse} def /RGBtoCMYK
72 {dup 0 get R_scale mul R_shift add /c_i exch def dup 1 get G_scale
73 mul G_shift add /m_i exch def 2 get B_scale mul B_shift add /y_i exch
74 def /k_i c_i m_i y_i min min def O_Str dup 0 255 0 c_i k_i UCR sub
75 cvi max min put dup 1 255 0 m_i k_i UCR sub cvi max min put dup 2 255
76 0 y_i k_i UCR sub cvi max min put dup 3 255 0 k_i BG cvi max min put
77 } def /RGBtoCMYKfilter { ImageDict /Decode get aload pop 2 copy sub
78 /B_scale exch def pop 255 mul 255 exch sub /B_shift exch def 2 copy
79 sub /G_scale exch def pop 255 mul 255 exch sub /G_shift exch def 2
80 copy sub /R_scale exch def pop 255 mul 255 exch sub /R_shift exch def
81 /rtc_file ImageDict /DataSource get def ImageDict /DataSource {rtc_file
82 i_Str readstring {RGBtoCMYK} if} 0 () /SubFileDecode filter put /DeviceCMYK
83 setcolorspace /ncomp 4 def ImageDict /Decode [0 1 0 1 0 1 0 1] put
84 } def /sep_str 8192 string def /SEP_CMYK { 0 hax_sep 4 3 index length
85 1 sub { 2 index exch get 3 copy put pop 1 add } for dup 0 ne {0 exch
86 getinterval}{pop pop ()} ifelse } def /SEPfilters { ncomp 4 eq { hax_sep
87 3 le { /sepproc /SEP_CMYK load def ImageDict begin /Decode [ Decode
88 hax_sep 2 mul 1 add get Decode hax_sep 2 mul get ] def end } { /sepproc
89 {dup length 4 idiv 0 exch getinterval} def } ifelse /sep_file ImageDict
90 /DataSource get def ImageDict /DataSource {sep_file sep_str readstring
91 pop sepproc} 0 () /SubFileDecode filter put /DeviceGray setcolorspace
92 } {hax_sep 3 ne {ImageDict /Decode [ 1 1 ] put} if } ifelse hax_sep
93 4 eq {ImageDict /Decode [ 1 1 ] put} if hax_sep 5 eq {ImageDict /Decode
94 [ 0 0 ] put} if } def /change_str 12288 string def /CHANGEfilter {
95 /change_file ImageDict /DataSource get def ImageDict /DataSource {
96 change_file change_str readstring pop 0 ncomp 2 index length ncomp
97 sub { 1 index exch 2 copy ncomp getinterval changebits putinterval
98 } for } 0 () /SubFileDecode filter put } def /hax_image_ { ImageDict
99 /MultipleDataSources known { ImageDict /MultipleDataSources get { ImageDict
100 /MultipleDataSources false put ImageDict /DataSource get length dup
101 4 eq {merge_multi4} if dup 3 eq {merge_multi3} if 1 eq {ImageDict begin
102 /DataSource DataSource aload pop def end} if } if } if ImageDict begin
103 /DataSource dup load Width BitsPerComponent mul 7 add 8 idiv Height
104 ncomp mul mul () /SubFileDecode filter def end to_change_bitmap {CHANGEfilter}
105 if ncomp 3 eq to_convert_bitmap and {RGBtoCMYKfilter} if ncomp 3 ne
106 to_sep_bitmap and {SEPfilters} if ImageDict ori_image } def /zero_data_str
107 65532 string def /hax_imagemask { if_delblack { dup type cvlit /dicttype
108 eq { /ImageDict exch def } { /ImageDict 7 dict def ImageDict begin
109 /DataSource exch def /ImageMatrix exch def /Decode exch {[1 0]} {[0
110 1]} ifelse def /Height exch def /Width exch def /BitsPerComponent 1
111 def /ImageType 1 def end } ifelse ImageDict begin /DataSource load
112 Width 7 add 8 idiv Height mul () /SubFileDecode filter end /mask_file
113 exch def ImageDict /DataSource { zero_data_str 0 mask_file data_str
114 readstring pop length getinterval } 0 () /SubFileDecode filter put
115 ImageDict /Decode [1 0] put ImageDict ori_imagemask } {ori_imagemask}
116 ifelse } def /epsilon 0.005 def /if_delblack false def /to_change_bitmap
117 false def /to_convert_bitmap false def /to_sep_bitmap false def
118 currentcmykcolor setcmykcolor end
119 %
120 /dot_spot {dup mul exch dup mul add 1 exch sub 2 div} def 150 0 {dot_spot}
121 setscreen
122 %
123 userdict begin
124 color_sep 0 eq
125 {/hax_setcmykcolor {maybe_black pop pop pop 1 exch sub ori_setgray} def
126 ScreenFrequency Cangle {dot_spot} setscreen}
127 {color_sep 1 eq
128 {/hax_setcmykcolor {maybe_black pop pop exch pop 1 exch sub ori_setgray} def
129 ScreenFrequency Mangle {dot_spot} setscreen}
130 {color_sep 2 eq
131 {/hax_setcmykcolor {maybe_black pop exch pop exch pop 1 exch sub ori_setgray} def
132 ScreenFrequency Yangle {dot_spot} setscreen}
133 {/hax_setcmykcolor {exch pop exch pop exch pop 1 exch sub ori_setgray} def
134 ScreenFrequency Kangle {dot_spot} setscreen}
135 ifelse
136 } ifelse
137 } ifelse
138 end
139 %
140 userdict begin /image /hax_image load def /colorimage /hax_colorimage
141 load def /imagemask /hax_imagemask load def
142 /to_sep_bitmap true def /to_convert_bitmap true def
143 end
144 currentcmykcolor setcmykcolor