Source PostScript (currentppathtransform.pps)

Retour Texte non formaté
%% syntaxe : {f} currentppathtransform --> applique la transformation f %% au chemin courant /currentppathtransform { 6 dict begin /warp exch def %% pour remplacer 'move' /warpmove{ 2 index { newpath } if warp moveto pop false } def %% pour remplacer 'lineto' /warpline { warp lineto } bind def %% pour remplacer 'curveto' /warpcurve { 6 2 roll warp 6 2 roll warp 6 2 roll warp curveto } bind def true { warpmove } { warpline } { warpcurve } { closepath } pathforall pop end } def %% syntaxe : {f} currentpathtransform --> applique la transformation f %% au chemin courant /currentpathtransform { 7 dict begin /transform exch def /warp {ptojpoint transform} def %% pour remplacer 'move' /warpmove{ 2 index { newpath } if warp smoveto pop false } def %% pour remplacer 'lineto' /warpline { warp slineto } bind def %% pour remplacer 'curveto' /warpcurve { 6 2 roll warp 6 2 roll warp 6 2 roll warp scurveto } bind def true { warpmove } { warpline } { warpcurve } { closepath } pathforall pop end } def