home *** CD-ROM | disk | FTP | other *** search
- %!
- %%Title: (1VISION (R) OverFill Operators)
- %%Version: 1.0
- %%Copyright: ((C) OneVision GmbH, Regensburg All Rights Reserved)
-
- currentpacking true setpacking
- /overfill where {pop userdict /undoSaveToken save put} {} ifelse
-
- /_TMSOverFillGstate 3 dict def
- _TMSOverFillGstate begin
- /gsavelevel 0 def
- /stack 10 array def
- end
- /currentoverfill
- { _TMSOverFillGstate /stack get _TMSOverFillGstate /gsavelevel get get
- } hardbind def
- /setoverfill
- { _TMSOverFillGstate /stack get _TMSOverFillGstate /gsavelevel get 3 -1 roll put
- } hardbind def
- 0 setoverfill
- /gsave
- { gsave
- currentoverfill
- _TMSOverFillGstate /gsavelevel _TMSOverFillGstate /gsavelevel get 1 add put
- _TMSOverFillGstate /stack get length _TMSOverFillGstate /gsavelevel get le
- { _TMSOverFillGstate /stack get dup length 10 add array
- _TMSOverFillGstate /stack 2 index put copy pop
- _TMSOverFillGstate /stack get dup length 10 sub
- 10 {2 copy 0 put 1 add} repeat pop pop
- } if
- setoverfill
- } hardbind def
- /grestore
- { _TMSOverFillGstate /gsavelevel _TMSOverFillGstate /gsavelevel get 1 sub put
- grestore
- } hardbind def
-
- /shouldoverfill
- { currentoverfill 0 gt
- { gsave mark {{} settransfer} stopped
- {cleartomark false} {cleartomark true} ifelse grestore
- { gsave separate mark currentcolor dup type /dicttype eq {pop} if
- counttomark 1 eq
- {exch pop 1 exch sub currenttransfer exec 1 lt}
- {cleartomark false}
- ifelse
- grestore
- }
- {false}
- ifelse
- }
- {false}
- ifelse
- } hardbind def
- /overfill
- { gsave initmatrix 0 setlinejoin 1 setlinecap [] 0 setdash currentoverfill 2 mul setlinewidth
- stroke grestore
- } hardbind def
-
- /defIfKnown {1 index where {pop hardbind def} {pop pop} ifelse} hardbind def
-
- /closeallsubpaths
- { true {3 -1 roll {newpath} {closepath} ifelse moveto false} {lineto} {curveto} {closepath}
- pathforall pop closepath
- } bind def
- /fill
- { shouldoverfill {gsave fill grestore closeallsubpaths overfill newpath} {fill} ifelse
- } hardbind def
- /eofill
- { shouldoverfill {gsave eofill grestore closeallsubpaths overfill newpath} {eofill} ifelse
- } hardbind def
- /stroke
- { shouldoverfill
- { 1 0 dtransform dup mul exch dup mul add
- 0 1 dtransform dup mul exch dup mul add
- sub abs 0.0001 lt
- 1 0 dtransform dup mul exch dup mul add
- 1 0 dtransform 0 1 dtransform 4 -1 roll mul 3 1 roll mul sub abs
- sub abs 0.0001 lt
- and
- gsave
- { currentoverfill 2 mul
- 1 0 dtransform dup mul exch dup mul add sqrt div currentlinewidth add
- }
- { stroke grestore gsave strokepath
- initmatrix 1 setlinejoin 1 setlinecap [] 0 setdash currentoverfill 2 mul
- }
- ifelse
- setlinewidth stroke
- grestore
- newpath
- }
- {stroke}
- ifelse
- } hardbind def
- /ufill {gsave newpath uappend fill grestore} defIfKnown
- /ueofill {gsave newpath uappend eofill grestore} defIfKnown
- /ustroke
- { gsave newpath dup length 6 eq
- {exch uappend concat} {uappend} ifelse
- stroke
- grestore
- } defIfKnown
- /__RectPath
- { 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath
- } bind def
- /__ProcessRectArgs
- { 1 index type /arraytype eq
- { exch 0 4 2 index length 1 sub
- {dup 3 add 1 exch{1 index exch get exch}for
- 5 1 roll 5 index exec
- }for pop pop
- }
- {exec}
- ifelse
- } bind def
- /rectfill
- { gsave newpath {__RectPath fill} __ProcessRectArgs grestore
- } defIfKnown
- /rectstroke
- { gsave
- newpath dup type /arraytype eq
- {dup length 6 eq} {false} ifelse
- {{gsave __RectPath null concat stroke grestore}
- dup length array cvx copy dup 2 4 -1 roll put __ProcessRectArgs
- }
- {{__RectPath stroke} __ProcessRectArgs}
- ifelse
- grestore
- } defIfKnown
-
- /overfillshow
- { currentpoint 2 index show
- gsave newpath moveto true charpath overfill grestore
- } hardbind def
- /show
- { shouldoverfill {overfillshow} {show} ifelse
- } hardbind def
- userdict /_TMSTmpString ( ) put
- /ashow
- { shouldoverfill
- { { _TMSTmpString exch 0 exch put _TMSTmpString overfillshow
- 2 copy rmoveto
- } forall
- 2 {pop} repeat
- }
- {ashow}
- ifelse
- } hardbind def
- /widthshow
- { shouldoverfill
- { { dup _TMSTmpString exch 0 exch put _TMSTmpString overfillshow
- 1 index eq {2 {2 index} repeat rmoveto} if
- } forall
- 3 {pop} repeat
- }
- {widthshow}
- ifelse
- } hardbind def
- /awidthshow
- { shouldoverfill
- { { _TMSTmpString exch 0 exch put _TMSTmpString overfillshow
- 2 copy rmoveto
- 2 index _TMSTmpString 0 get eq {2 {4 index} repeat rmoveto} if
- } forall
- 5 {pop} repeat
- }
- {awidthshow}
- ifelse
- } hardbind def
- /kshow
- { shouldoverfill
- { dup 0 get
- _TMSTmpString exch 0 exch put
- _TMSTmpString overfillshow
- dup length 1 gt
- { 1 1 index length 1 sub getintervall
- { _TMSTmpString 0 get exch
- dup _TMSTmpString exch 0 exch put
- {3 index exec}
- _TMSTmpString overfillshow
- } forall
- }
- {pop}
- ifelse
- pop
- }
- {kshow}
- ifelse
- } hardbind def
- /glyphshow {pop} defIfKnown
- /xshow
- { shouldoverfill
- { 0 1 3 index length 1 sub
- { currentpoint 4 index 3 index 1 getinterval overfillshow
- exch 3 index 3 index get add exch moveto pop
- } for
- pop pop
- }
- {xshow}
- ifelse
- } defIfKnown
- /yshow
- { shouldoverfill
- { 0 1 3 index length 1 sub
- { currentpoint 4 index 3 index 1 getinterval overfillshow
- 3 index 3 index get add moveto pop
- } for
- pop pop
- }
- {yshow}
- ifelse
- } defIfKnown
- /xyshow
- { shouldoverfill
- { 0 1 3 index length 1 sub
- { currentpoint 4 index 3 index 1 getinterval overfillshow
- 3 index 3 index 2 mul 1 add get add exch
- 3 index 3 index 2 mul get add exch moveto pop
- } for
- pop pop
- }
- {xyshow}
- ifelse
- } defIfKnown
-
- userdict /undoSaveToken known {userdict /undoSaveToken get restore} if
- setpacking
-