Source PostScript (line.pps)

Retour Texte non formaté
%% 23-06-06 %% %% syntaxe : A B simpleline %% 23-06-06 %% /simpleline { %% 23-06-06 %% gsave %% 23-06-06 %% newpath %% 23-06-06 %% smoveto %% 23-06-06 %% slineto %% 23-06-06 %% stroke %% 23-06-06 %% grestore %% 23-06-06 %% } def %% 23-06-06 %% %% 23-06-06 %% %% syntaxe : A B (-) line %% 23-06-06 %% /line { %% 23-06-06 %% 3 dict begin %% 23-06-06 %% dup isstring %% 23-06-06 %% { %% 23-06-06 %% /option exch def %% 23-06-06 %% } %% 23-06-06 %% if %% 23-06-06 %% /B defpoint %% 23-06-06 %% /A defpoint %% 23-06-06 %% /u {A B angle dir nodesep dup ptojpoint pop mulv} def %% 23-06-06 %% A u addv /A' defpoint %% 23-06-06 %% B u subv /B' defpoint %% 23-06-06 %% option (-) search %% 23-06-06 %% { %% 23-06-06 %% pop pop %% 23-06-06 %% /doubleline false store %% 23-06-06 %% } %% 23-06-06 %% if %% 23-06-06 %% pop %% 23-06-06 %% option (=) search %% 23-06-06 %% { %% 23-06-06 %% pop pop %% 23-06-06 %% /doubleline true store %% 23-06-06 %% } %% 23-06-06 %% if %% 23-06-06 %% pop %% 23-06-06 %% gsave %% 23-06-06 %% newpath %% 23-06-06 %% A' smoveto %% 23-06-06 %% B' slineto %% 23-06-06 %% stroke %% 23-06-06 %% grestore %% 23-06-06 %% currentdict /option known { %% 23-06-06 %% B' A' B' milieu A' A' A' B' milieu B' option gere_arrowhead %% 23-06-06 %% } if %% 23-06-06 %% end %% 23-06-06 %% } def %% 23-06-06 %% %% syntaxe : A B (-) line /line { 3 dict begin dup isstring { /option exch def } if /B defpoint /A defpoint currentdict /option known { [A B] option ligne } { [A B] ligne } ifelse end } def