Source PostScript (ifputcolors.pps)

Retour Texte non formaté
%% syntaxe : solid str1 str2 bool ifputoutcolors --> - %% colorie en str1 si <> de str2 /ifputincolors { 1 ifputc@l@rs } def /ifputoutcolors { 2 ifputc@l@rs } def /ifputc@l@rs { 10 dict begin 2 eq { /getcol {solidgetoutcolors} def /putcol {solidputoutcolors} def } { /getcol {solidgetincolors} def /putcol {solidputincolors} def } ifelse /bool exch def /str2 exch def /str1 exch def /solid exch def /FC solid getcol def 0 1 FC length 1 sub { /i exch def FC i get str2 search { /correspondance true def pop pop pop } { /correspondance false def pop } ifelse correspondance bool and correspondance not bool not and or { FC i str1 put } if } for solid FC putcol end } def