Source PostScript (hachure.pps)

Retour Texte non formaté
%%% pour les hachures /hstep 7 def %% ecart entre 2 hachures /hangle 45 neg def %% angulation des hachures /hwidth .8 def %% largeur de trait /hcolor {} def %% couleur /hachure { gsave 1 dict begin hcolor hwidth setlinewidth newpath xtranslate neg ytranslate neg translate % on annule la translation 2 border mul width add 2 div % (width + 2 border)/2 2 border mul height add 2 div % (height + 2 border)/2 translate % on translate plein centre hangle rotate /hrayon 2 sqrt width height max mul cvi 2 div def % on hachure une fenetre de dim : hrayon x hrayon newpath hrayon neg hrayon neg moveto % en bas a gauche 2 hrayon mul truncate cvi hstep div round cvi { hrayon 2 mul 0 rlineto hrayon 2 mul neg hstep rmoveto } repeat stroke end grestore } def