Source PostScript (picture.pps)

Retour Texte non formaté
%% ATTENTION, ces routines supposent que le dessin transmis aux %% routines 'picture' trace a partir du point courant %%% les parametres %% switch et ses commandes pour le calcul des 16 pts de ref de picture /pictpointsOn { /pictpoints true def } def /pictpointsOff { /pictpoints false def } def /currentpictpoints { pictpoints } def pictpointsOn %% switch et ses commandes pour l'inclusion du dictionnaire de node %% dans le dictionnaire courant apres l'utilisation de picture /loadnodedictOn { /loadnodedict true def } def /loadnodedictOff { /loadnodedict false def } def /currentloadnodedict { loadnodedict } def loadnodedictOn /secondPictdic 50 dict def /Pictdic1 50 dict def /Pictdic2 50 dict def /Pictdic3 50 dict def /tmpPictdict 50 dict def /dsave1 { Pictdic Pictdic1 copy pop } def /drestore1 { Pictdic1 Pictdic copy pop Pictdic1 {pop Pictdic1 exch undef} forall } def /dsave2 { Pictdic Pictdic2 copy pop } def /drestore2 { Pictdic2 Pictdic copy pop Pictdic2 {pop Pictdic2 exch undef} forall } def /dsave3 { Pictdic Pictdic3 copy pop } def /drestore3 { Pictdic3 Pictdic copy pop Pictdic3 {pop Pictdic3 exch undef} forall } def /savePictdic { Pictdic secondPictdic copy pop } def /restorePictdic { secondPictdic Pictdic copy pop secondPictdic {pop secondPictdic exch undef} forall } def /clearPictdic { Pictdic {pop Pictdic exch undef} forall } def /cleartmpPictdict { tmpPictdict {pop tmpPictdict exch undef} forall } def /hadjust 3.75 def /vadjust 3.75 def /dx_boxit 3 def /dy_boxit 3 def /diax_boxit 0 def /diay_boxit 0 def /decalage_pictlabel {} def %% pour charger un nom en provenance de Pictdic /pictget { Pictdic exch get exec } def %% en interne, on utilise les parametres suivant %% angle_rot %% %% vect_transl %% les options lues par recup_opt %% vect_scale %% %% with_decal %% switch indiquant si oui ou non on %% decale par rapport au point jps d'appel %% decalage_pictlabel %% le vecteur de decalage (en points ps), %% llx, lly, wx, wy %% coordonnées postscript de la boite par %% rapport à sa propre origine, calculees %% par boxpictdim, et stockees par recup_dim_pict %% pict_ht, pict_wd %% dimensions de la boite, calculees et %% stockees par recup_dim_pict %% un booleen pour le cas ou l'utilisateur voudrait recuperer les %% dimensions utilisees en interne dans son dictionnaire courant %% a priori pas de transmission /transmet_dim false def %% depose sur la pile diverses dimensions concernant la boite a afficher /depose_dim { pict_wd vect_scale pop mul pict_ht vect_scale exch pop mul llx vect_scale pop mul lly vect_scale exch pop mul wx vect_scale pop mul wy vect_scale exch pop mul } def %% recupere sur la pile diverses dimensions concernant la boite a afficher /charge_dim { /wy exch def /wx exch def /lly exch def /llx exch def /pict_ht exch def /pict_wd exch def } def %% les switchs pour encadrement rectangulaire /boxit { /with_box true def } def /boxit_all { /with_box true def /remove_boxit {} def } def /boxit_none { /with_box false def /remove_boxit { /with_box false store } def } def boxit_none %% les switchs pour encadrement circulaire /circleit { /with_circbox true def } def /circleit_all { /with_circbox true def /remove_circleit {} def } def /circleit_none { /with_circbox false def /remove_circleit { /with_circbox false store } def } def circleit_none %% les switchs pour encadrement Circulaire (cercle de rayon constant) /Circleit { /with_Circbox true def } def /Circleit_all { /with_Circbox true def /remove_Circleit {} def } def /Circleit_none { /with_Circbox false def /remove_Circleit { /with_Circbox false store } def } def Circleit_none %% les switchs pour encadrement losange (diamond) /diaboxit { /with_diabox true def } def /diaboxit_all { /with_diabox true def /remove_diaboxit {} def } def /diaboxit_none { /with_diabox false def /remove_diaboxit { /with_diabox false store } def } def diaboxit_none %% les switchs pour encadrement losange (diamond) /ovalit { /with_oval true def } def /ovalit_all { /with_oval true def /remove_ovalit {} def } def /ovalit_none { /with_oval false def /remove_ovalit { /with_oval false store } def } def ovalit_none %% attention, ne peut etre appele que de l'interieur de p@cturee, utilise %% un dictionnaire local a cette fonction %% trace le cercle entourant la boite a afficher /circl@it_l@bel { gsave 2 dict begin %% point extremal 1 llx lly ptojpoint pict_transform /circlept1 defpoint %% point extremal 2 wx wy ptojpoint pict_transform /circlept2 defpoint drawpicture { circlept1 circlept2 milieu %% centre dupp circlept1 distance %% rayon cercle* } if %% sauvegarde des donnees en cas de declaration de cnode cn@deencours { n@dedict /noderayon circlept1 circlept2 milieu circlept1 distance put } if end grestore } def /Circleradius .5 def %% attention, ne peut etre appele que de l'interieur de p@cturee, utilise %% un dictionnaire local a cette fonction %% trace le cercle entourant la boite a afficher /Circl@it_l@bel { gsave 2 dict begin %% point extremal 1 llx lly ptojpoint pict_transform /Circlept1 defpoint %% point extremal 2 wx wy ptojpoint pict_transform /Circlept2 defpoint drawpicture { Circlept1 Circlept2 milieu %% centre Circleradius %% rayon cercle* } if %% sauvegarde des donnees en cas de declaration de cnode Cn@deencours { n@dedict /noderayon Circleradius put } if end grestore } def %% attention, ne peut etre appele que de l'interieur de p@cturee, utilise %% un dictionnaire local a cette fonction %% trace le rectangle encadrant la boite a afficher /diab@xit_l@bel { gsave 2 dict begin wx llx add 2 div lly wy add 2 div ptojpoint pict_transform %% cc wx lly wy add 2 div ptojpoint pict_transform %% cr vecteur /u defpoint wx llx add 2 div lly wy add 2 div ptojpoint pict_transform %% cc wx llx add 2 div wy ptojpoint pict_transform %% uc vecteur /v defpoint wx lly wy add 2 div ptojpoint pict_transform %% cr u addv /rdia defpoint llx lly wy add 2 div ptojpoint pict_transform %% cl u subv /ldia defpoint wx llx add 2 div wy ptojpoint pict_transform %% uc v addv /udia defpoint wx llx add 2 div lly ptojpoint pict_transform %% dc v subv /ddia defpoint [udia ldia ddia rdia] %% Pictdic /rdia [ rdia ] cvx put %% Pictdic /ldia [ ldia ] cvx put %% Pictdic /udia [ udia ] cvx put %% Pictdic /ddia [ ddia ] cvx put drawpicture { with_oval { pol2ell ellipse* % remove_ovalit } { polygone* % remove_diaboxit } ifelse } if end grestore } def %% meme manip que pour p@cture, mais avec un "stranslate" et pas un "smoveto" /manip_deplacement_picture { M stranslate angle_rot rotate with_decal {ajustement_p@ct translate} if vect_transl translate vect_scale scale decalage_pictlabel translate } def %% attention, ne peut etre appele que de l'interieur de p@cturee, utilise %% un dictionnaire local a cette fonction %% trace le rectangle encadrant la boite a afficher /b@xit_l@bel { drawpicture { Rn@deencours not { [ llx lly ptojpoint pict_transform wx lly ptojpoint pict_transform wx wy ptojpoint pict_transform llx wy ptojpoint pict_transform ] polygone* } { gsave newpath [ llx lly ptojpoint pict_transform wx lly ptojpoint pict_transform wx wy ptojpoint pict_transform llx wy ptojpoint pict_transform ] polygone_ fillstyle closepath grestore /Rn@deencours false store } ifelse } if } def %% recupere le nom de l'objet, initialise les methodes 'picture' %% et 'picture_dim', puis charge les defs des points speciaux de %% l'objet dans le dictionnaire Pictdic /recup_pict_name { 13 dict begin %% le dictionnaire sera ferme par la procedure p@cture /picture_name exch def /picture picture_name cvx def /picture_dim picture_name (_dim) append cvx def %% y a-t-il des points definis pour l'objet ? /objdic_name picture_name (_dic) append cvn def %% 30/04/05 %% %% on copie le dictionnaire des points ds Pictdic %% 30/04/05 %% objdic_name where %% 30/04/05 %% {pop objdic_name load Pictdic copy pop} %% 30/04/05 %% if } def %% recupere les 3 arguments optionnels passes a une commande de pict %% et initialise les parametres internes angle_rot, vect_transl et %% vect_scale /recup_opt { /angle_rot 0 def /vect_transl {0 0} def /vect_scale {1 1} def /with_decal true def /options_picture where { pop options_picture /options_picture where pop /options_picture undef } if dup xcheck %% y a-t-il un angle specifie ? {/angle_rot exch store} %% oui, on le stocke if dup isarray %% y a-t-il une scaling specifie {/vect_scale exch cvx def} %% oui, on le stocke if dup isstring { dup length 0 eq { /with_decal false def pop } { /vect_transl exch cvx def } ifelse } if } def %% syntaxe : pict x y boxpictdim --> pict x y llx lly wx wy, en tenant compte %% de l'encadrement %% attention, doit laisser la pile intacte /boxpictdim { %% la commande livree avec l'objet passe a 'picture' indiquant la %% BB en picas de cet objet picture_dim %% il faut maintenant tenir compte de l'encadrement with_box with_circbox or { dx_boxit dy_boxit addv exchp dx_boxit dy_boxit subv exchp } if with_oval with_diabox or { diax_boxit diay_boxit addv exchp diax_boxit diay_boxit subv exchp } if %% ici on calcule en cas d'oval ou diabox } def %% syntaxe : pict x y recup_dim_pict --> stocke width et height de la %% boite contenant pict dans les variables pict_wd et pict_ht, et stocke %% les coordonees llx, lly, wx et wy /recup_dim_pict { boxpictdim /wy exch def /wx exch def /lly exch def /llx exch def llx lly wx wy vecteur /pict_ht exch def /pict_wd exch def } def %% preliminaire a un nouvel affichage par p@cture : %% - nettoyage du dictionnaire Pictdic %% - restoration du dictionnaire sauvegarde secondPictdic %% - lecture des différents arguments sur la pile (nom de l'objet, options %% - d'angle, de deplacement, de scaling) %% - initialisation de differentes variables (dimension de l'objet,...) /init_pict { cleartmpPictdict clearPictdic restorePictdic recup_pict_name recup_opt recup_dim_pict } def %% syntaxe : x y pict_transform %% --> X Y, transforme du point (x, y) ds le repere jps /pict_transform { 12 dict begin jtoppoint /y exch def /x exch def %% le scale /sx vect_scale pop def /sy vect_scale exch pop def %% le decalage /xd decalage_pictlabel pop def /yd decalage_pictlabel exch pop def %% l'ajustement_p@ct with_decal { /xa ajustement_p@ct pop def /ya ajustement_p@ct exch pop def } { /xa 0 def /ya 0 def } ifelse %% la translation /xt vect_transl pop def /yt vect_transl exch pop def /a sx xd mul xa add xt add def /b sy yd mul ya add yt add def sx angle_rot cos mul x mul sy angle_rot sin mul y mul sub sx angle_rot sin mul x mul sy angle_rot cos mul y mul add a angle_rot cos mul b angle_rot sin mul sub a angle_rot sin mul b angle_rot cos mul add addv ptojpoint M addv end } def %% 03/02/05 %% %% syntaxe : pict M dir_x dir_y p@cture ou M dans le repere jps, dx, %% 03/02/05 %% %% dy dans le repere ps --> ecrit le picte dont le coin inferieur %% 03/02/05 %% %% gauche de la BB est au point M, avec le decalage (dx, dy). Apres le %% 03/02/05 %% %% decalage, applique translation, scale puis rotate definis par les %% 03/02/05 %% %% options %% 03/02/05 %% /p@cture { %% 03/02/05 %% %%gsave %% 03/02/05 %% %% ouverture du dictionnaire par recup_opt %% 03/02/05 %% /M defpoint %% 03/02/05 %% %% 03/02/05 %% Pictdic /dl {0 0 jtoppoint llx lly addv ptojpoint} bind put %% 03/02/05 %% Pictdic /bl {0 0 jtoppoint llx 0 addv ptojpoint} bind put %% 03/02/05 %% Pictdic /cl {0 0 jtoppoint llx lly wy add 2 div addv ptojpoint} bind put %% 03/02/05 %% Pictdic /ul {0 0 jtoppoint llx wy addv ptojpoint} bind put %% 03/02/05 %% %% 03/02/05 %% Pictdic /dr {0 0 jtoppoint wx lly addv ptojpoint} bind put %% 03/02/05 %% Pictdic /br {0 0 jtoppoint wx 0 addv ptojpoint} bind put %% 03/02/05 %% Pictdic /cr {0 0 jtoppoint wx lly wy add 2 div addv ptojpoint} bind put %% 03/02/05 %% Pictdic /ur {0 0 jtoppoint wx wy addv ptojpoint} bind put %% 03/02/05 %% %% 03/02/05 %% Pictdic /dc {0 0 jtoppoint wx llx add 2 div lly addv ptojpoint} bind put %% 03/02/05 %% Pictdic /bc {0 0 jtoppoint wx llx add 2 div 0 addv ptojpoint} bind put %% 03/02/05 %% Pictdic /cc {0 0 jtoppoint wx llx add 2 div lly wy add 2 div addv ptojpoint} bind put %% 03/02/05 %% Pictdic /uc {0 0 jtoppoint wx llx add 2 div wy addv ptojpoint} bind put %% 03/02/05 %% %% 03/02/05 %% Pictdic /db {0 0 jtoppoint 0 lly addv ptojpoint} bind put %% 03/02/05 %% Pictdic /bb {0 0 jtoppoint} bind put %% 03/02/05 %% Pictdic /cb {0 0 jtoppoint 0 wy lly add 2 div addv ptojpoint} bind put %% 03/02/05 %% Pictdic /ub {0 0 jtoppoint 0 wy addv ptojpoint} bind put %% 03/02/05 %% %% 03/02/05 %% %% on extrait tous les point de Pictdic %% 03/02/05 %% Pictdic {} forall %% 03/02/05 %% %% et on leur applique la meme transformation qu'a l'objet %% 03/02/05 %% %% global puis on les restocke dans Pictdict %% 03/02/05 %% Pictdic length { %% 03/02/05 %% exec pict_transform [ 3 1 roll ] cvx store %% 03/02/05 %% } repeat %% 03/02/05 %% %% 03/02/05 %% %% on pratique les encadrements si necessaire %% 03/02/05 %% with_circbox {circl@it_l@bel remove_circleit} if %% 03/02/05 %% with_Circbox {Circl@it_l@bel remove_Circleit} if %% 03/02/05 %% with_box {b@xit_l@bel remove_boxit} if %% 03/02/05 %% with_diabox with_oval or {diab@xit_l@bel} if %% 03/02/05 %% %% 03/02/05 %% gsave %% 03/02/05 %% %% ici on met un "smoveto" pour conserver le point courant a la %% 03/02/05 %% %% fin du dessin %% 03/02/05 %% M smoveto %% 03/02/05 %% angle_rot rotate %% 03/02/05 %% with_decal {ajustement_p@ct rmoveto} if %% 03/02/05 %% vect_transl rmoveto %% 03/02/05 %% vect_scale scale %% 03/02/05 %% decalage_pictlabel rmoveto %% 03/02/05 %% picture %% 03/02/05 %% currentpoint /save_current_point defpoint %% 03/02/05 %% grestore %% 03/02/05 %% %% 03/02/05 %% save_current_point moveto %% 03/02/05 %% %% 03/02/05 %% n@deencours dian@deencours or %% 03/02/05 %% ovaln@deencours or cn@deencours or Cn@deencours or { %% 03/02/05 %% %% on extrait tous les point de Pictdic %% 03/02/05 %% Pictdic {} forall %% 03/02/05 %% %% et on les stocke dans n@dedict %% 03/02/05 %% Pictdic length { %% 03/02/05 %% n@dedict 3 1 roll put %% 03/02/05 %% } repeat %% 03/02/05 %% ovaln@deencours {n@dedict /nodetype /oval put } if %% 03/02/05 %% /n@deencours false store %% 03/02/05 %% /dian@deencours false store %% 03/02/05 %% /ovaln@deencours false store %% 03/02/05 %% } if %% 03/02/05 %% %% 03/02/05 %% transmet_dim {depose_dim} if %% 03/02/05 %% end %% 03/02/05 %% transmet_dim {charge_dim} if %% 03/02/05 %% } def %% syntaxe : x y str_pict brpict %% avec eventuellement les arguments optionnels %% <{angle_rot} (vect_transl) [vect_scale]> /brpict { init_pict /ajustement_p@ct {hadjust 0} def /decalage_pictlabel {llx neg 0} def p@cture } def /bbpict { init_pict /ajustement_p@ct {0 0} def /decalage_pictlabel {0 0} def p@cture } def /blpict { init_pict /ajustement_p@ct {hadjust neg 0} def /decalage_pictlabel {wx neg 0} def p@cture } def /bcpict { init_pict /ajustement_p@ct {0 0} def /decalage_pictlabel {wx llx add -.5 mul 0} def p@cture } def /ubpict { init_pict /ajustement_p@ct {0 vadjust} def /decalage_pictlabel {0 lly neg} def p@cture } def /urpict { init_pict /ajustement_p@ct {hadjust vadjust} def /decalage_pictlabel {llx neg lly neg} def p@cture } def /ulpict { init_pict /ajustement_p@ct {hadjust neg vadjust} def /decalage_pictlabel {wx neg lly neg} def p@cture } def /ucpict { init_pict /ajustement_p@ct {0 vadjust} def /decalage_pictlabel {llx wx add -.5 mul lly neg} def p@cture } def /drpict { init_pict /ajustement_p@ct {hadjust vadjust neg} def /decalage_pictlabel {llx neg wy neg} def p@cture } def /dbpict { init_pict /ajustement_p@ct {0 vadjust neg} def /decalage_pictlabel {0 wy neg} def p@cture } def /dlpict { init_pict /ajustement_p@ct {hadjust neg vadjust neg} def /decalage_pictlabel {wx neg wy neg} def p@cture } def /dcpict { init_pict /ajustement_p@ct {0 vadjust neg} def /decalage_pictlabel {llx wx add -2 div wy neg} def p@cture } def /crpict { init_pict /ajustement_p@ct {hadjust 0} def /decalage_pictlabel {llx neg lly wy add -2 div} def p@cture } def /cbpict { init_pict /ajustement_p@ct {0 0} def /decalage_pictlabel {0 lly wy add -2 div} def p@cture } def /clpict { init_pict /ajustement_p@ct {hadjust neg 0} def /decalage_pictlabel {wx neg lly wy add -2 div} def p@cture } def /ccpict { init_pict /ajustement_p@ct {0 0} def /decalage_pictlabel {llx wx add lly wy add -.5 mulv} def p@cture } def /spict { %% le 1er arg est-il un litteral dup type (nametype) cvn eq { 2 copy pop (_dic) append cvlit load exch get exec } if jtoppoint /le_y exch def /le_x exch def init_pict /ajustement_p@ct {0 0} def /decalage_pictlabel { le_x le_y -1 mulv } def p@cture } def %% ======================================================= /drawpicture true def %% syntaxe : pict M dir_x dir_y p@cture ou M dans le repere jps, dx, %% dy dans le repere ps --> ecrit le picte dont le coin inferieur %% gauche de la BB est au point M, avec le decalage (dx, dy). Apres le %% decalage, applique translation, scale puis rotate definis par les %% options /p@cture { %%gsave %% ouverture du dictionnaire par recup_opt /M defpoint %% currentpictpoints { %% Pictdic /dl {0 0 jtoppoint llx lly addv ptojpoint} bind put %% Pictdic /bl {0 0 jtoppoint llx 0 addv ptojpoint} bind put %% Pictdic /cl {0 0 jtoppoint llx lly wy add 2 div addv ptojpoint} bind put %% Pictdic /ul {0 0 jtoppoint llx wy addv ptojpoint} bind put %% %% Pictdic /dr {0 0 jtoppoint wx lly addv ptojpoint} bind put %% Pictdic /br {0 0 jtoppoint wx 0 addv ptojpoint} bind put %% Pictdic /cr {0 0 jtoppoint wx lly wy add 2 div addv ptojpoint} bind put %% Pictdic /ur {0 0 jtoppoint wx wy addv ptojpoint} bind put %% %% Pictdic /dc {0 0 jtoppoint wx llx add 2 div lly addv ptojpoint} bind put %% Pictdic /bc {0 0 jtoppoint wx llx add 2 div 0 addv ptojpoint} bind put %% Pictdic /cc {0 0 jtoppoint wx llx add 2 div lly wy add 2 div addv ptojpoint} bind put %% Pictdic /uc {0 0 jtoppoint wx llx add 2 div wy addv ptojpoint} bind put %% %% Pictdic /db {0 0 jtoppoint 0 lly addv ptojpoint} bind put %% Pictdic /bb {0 0 jtoppoint } bind put %% Pictdic /cb {0 0 jtoppoint 0 wy lly add 2 div addv ptojpoint} bind put %% Pictdic /ub {0 0 jtoppoint 0 wy addv ptojpoint} bind put %% } if currentpictpoints { Pictdic /dl {llx lly ptojpoint} bind put Pictdic /bl {llx 0 ptojpoint} bind put Pictdic /cl {llx lly wy add 2 div ptojpoint} bind put Pictdic /ul {llx wy ptojpoint} bind put Pictdic /dr {wx lly ptojpoint} bind put Pictdic /br {wx 0 ptojpoint} bind put Pictdic /cr {wx lly wy add 2 div ptojpoint} bind put Pictdic /ur {wx wy ptojpoint} bind put Pictdic /dc {wx llx add 2 div lly ptojpoint} bind put Pictdic /bc {wx llx add 2 div 0 ptojpoint} bind put Pictdic /cc {wx llx add 2 div lly wy add 2 div ptojpoint} bind put Pictdic /uc {wx llx add 2 div wy ptojpoint} bind put Pictdic /db {0 lly ptojpoint} bind put Pictdic /bb {0 0 ptojpoint} bind put Pictdic /cb {0 wy lly add 2 div ptojpoint} bind put Pictdic /ub {0 wy ptojpoint} bind put } if with_circbox {circl@it_l@bel remove_circleit} if with_Circbox {Circl@it_l@bel remove_Circleit} if with_box {b@xit_l@bel remove_boxit} if with_diabox with_oval or {diab@xit_l@bel} if drawpicture { gsave %% ici on met un "smoveto" pour conserver le point courant a la %% fin du dessin M smoveto angle_rot rotate with_decal {ajustement_p@ct rmoveto} if vect_transl rmoveto vect_scale scale decalage_pictlabel rmoveto picture currentpoint /save_current_point defpoint grestore save_current_point moveto } { % %% il ne faut faire le pop que si on n'a pas de texlabel % picture_name length 8 ne {pop} if %% il ne faut faire le pop que si l'on a du texte picture_name (show) eqstring {pop} if }ifelse %% si on etait en dianode, on rajoute les diapoint ds Pictdict with_diabox with_oval or { 2 dict begin wx llx add 2 div lly wy add 2 div ptojpoint %% cc wx lly wy add 2 div ptojpoint %% cr vecteur /u defpoint wx llx add 2 div lly wy add 2 div ptojpoint %% cc wx llx add 2 div wy ptojpoint %% uc vecteur /v defpoint wx lly wy add 2 div ptojpoint %% cr u addv /rdia defpoint llx lly wy add 2 div ptojpoint %% cl u subv /ldia defpoint wx llx add 2 div wy ptojpoint %% uc v addv /udia defpoint wx llx add 2 div lly ptojpoint %% dc v subv /ddia defpoint Pictdic /rdia [ rdia ] cvx put Pictdic /ldia [ ldia ] cvx put Pictdic /udia [ udia ] cvx put Pictdic /ddia [ ddia ] cvx put remove_ovalit remove_diaboxit end } if %% on extrait tous les point de Pictdic Pictdic {} forall %% et on leur applique la meme transformation qu'a l'objet %% global puis on les restocke dans Pictdict Pictdic length { exec pict_transform [ 3 1 roll ] cvx store } repeat %% si l'objet a un dictionnaire associe ds l'environnement pict objdic_name where { pop %% on extrait tous les point de objdic objdic_name load {} forall %% et on leur applique la meme transformation qu'a l'objet %% global puis on les restocke dans Pictdict objdic_name load length { exec pict_transform [ 3 1 roll ] cvx Pictdic 3 1 roll put } repeat } if n@deencours dian@deencours or ovaln@deencours or cn@deencours or Cn@deencours or { %% on extrait tous les point de Pictdic Pictdic {} forall %% et on les stocke dans n@dedict Pictdic length { n@dedict 3 1 roll put } repeat ovaln@deencours {n@dedict /nodetype /oval put } if /n@deencours false store /cn@deencours false store /Cn@deencours false store /dian@deencours false store /ovaln@deencours false store loadnodedict { %% on extrait tous les point de Pictdic Pictdic {} forall %% et on les stocke dans tmpPictdict Pictdic length { exch chaine cvs n@den@mesuffix exch append exch tmpPictdict 3 1 roll put } repeat } if } if transmet_dim {depose_dim} if end %% on extrait tous les point de tmpPictdic tmpPictdict {} forall %% et on les stocke dans currentdict tmpPictdict length { currentdict 3 1 roll put } repeat transmet_dim {charge_dim} if } def /showpictpoints { gsave Pictdic {} forall %% et on les stocke dans currentdict Pictdic length { exec dotstyle pop } repeat grestore } def %% 07/03/06 %% %% ATTENTION, ces routines supposent que le dessin transmis aux %% 07/03/06 %% %% routines 'picture' trace a partir du point courant %% 07/03/06 %% %%% les parametres %% 07/03/06 %% %% 07/03/06 %% %% switch et ses commandes pour le calcul des 16 pts de ref de picture %% 07/03/06 %% /pictpointsOn { %% 07/03/06 %% /pictpoints true def %% 07/03/06 %% } def %% 07/03/06 %% /pictpointsOff { %% 07/03/06 %% /pictpoints false def %% 07/03/06 %% } def %% 07/03/06 %% /currentpictpoints { %% 07/03/06 %% pictpoints %% 07/03/06 %% } def %% 07/03/06 %% pictpointsOn %% 07/03/06 %% %% 07/03/06 %% %% switch et ses commandes pour l'inclusion du dictionnaire de node %% 07/03/06 %% %% dans le dictionnaire courant apres l'utilisation de picture %% 07/03/06 %% /loadnodedictOn { %% 07/03/06 %% /loadnodedict true def %% 07/03/06 %% } def %% 07/03/06 %% /loadnodedictOff { %% 07/03/06 %% /loadnodedict false def %% 07/03/06 %% } def %% 07/03/06 %% /currentloadnodedict { %% 07/03/06 %% loadnodedict %% 07/03/06 %% } def %% 07/03/06 %% loadnodedictOn %% 07/03/06 %% %% 07/03/06 %% /secondPictdic 50 dict def %% 07/03/06 %% /Pictdic1 50 dict def %% 07/03/06 %% /Pictdic2 50 dict def %% 07/03/06 %% /Pictdic3 50 dict def %% 07/03/06 %% /tmpPictdict 50 dict def %% 07/03/06 %% /dsave1 { %% 07/03/06 %% Pictdic Pictdic1 copy pop %% 07/03/06 %% } def %% 07/03/06 %% /drestore1 { %% 07/03/06 %% Pictdic1 Pictdic copy pop %% 07/03/06 %% Pictdic1 {pop Pictdic1 exch undef} forall %% 07/03/06 %% } def %% 07/03/06 %% /dsave2 { %% 07/03/06 %% Pictdic Pictdic2 copy pop %% 07/03/06 %% } def %% 07/03/06 %% /drestore2 { %% 07/03/06 %% Pictdic2 Pictdic copy pop %% 07/03/06 %% Pictdic2 {pop Pictdic2 exch undef} forall %% 07/03/06 %% } def %% 07/03/06 %% /dsave3 { %% 07/03/06 %% Pictdic Pictdic3 copy pop %% 07/03/06 %% } def %% 07/03/06 %% /drestore3 { %% 07/03/06 %% Pictdic3 Pictdic copy pop %% 07/03/06 %% Pictdic3 {pop Pictdic3 exch undef} forall %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /savePictdic { %% 07/03/06 %% Pictdic secondPictdic copy pop %% 07/03/06 %% } def %% 07/03/06 %% /restorePictdic { %% 07/03/06 %% secondPictdic Pictdic copy pop %% 07/03/06 %% secondPictdic {pop secondPictdic exch undef} forall %% 07/03/06 %% } def %% 07/03/06 %% /clearPictdic { %% 07/03/06 %% Pictdic {pop Pictdic exch undef} forall %% 07/03/06 %% } def %% 07/03/06 %% /cleartmpPictdict { %% 07/03/06 %% tmpPictdict {pop tmpPictdict exch undef} forall %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /hadjust 3.75 def %% 07/03/06 %% /vadjust 3.75 def %% 07/03/06 %% /dx_boxit 3 def %% 07/03/06 %% /dy_boxit 3 def %% 07/03/06 %% /diax_boxit 0 def %% 07/03/06 %% /diay_boxit 0 def %% 07/03/06 %% %% 07/03/06 %% /decalage_pictlabel {} def %% 07/03/06 %% %% pour charger un nom en provenance de Pictdic %% 07/03/06 %% /pictget { %% 07/03/06 %% Pictdic exch get exec %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% en interne, on utilise les parametres suivant %% 07/03/06 %% %% 07/03/06 %% %% angle_rot %% %% 07/03/06 %% %% vect_transl %% les options lues par recup_opt %% 07/03/06 %% %% vect_scale %% %% 07/03/06 %% %% 07/03/06 %% %% with_decal %% switch indiquant si oui ou non on %% 07/03/06 %% %% decale par rapport au point jps d'appel %% 07/03/06 %% %% decalage_pictlabel %% le vecteur de decalage (en points ps), %% 07/03/06 %% %% llx, lly, wx, wy %% coordonnées postscript de la boite par %% 07/03/06 %% %% rapport à sa propre origine, calculees %% 07/03/06 %% %% par boxpictdim, et stockees par recup_dim_pict %% 07/03/06 %% %% pict_ht, pict_wd %% dimensions de la boite, calculees et %% 07/03/06 %% %% stockees par recup_dim_pict %% 07/03/06 %% %% 07/03/06 %% %% un booleen pour le cas ou l'utilisateur voudrait recuperer les %% 07/03/06 %% %% dimensions utilisees en interne dans son dictionnaire courant %% 07/03/06 %% %% a priori pas de transmission %% 07/03/06 %% /transmet_dim false def %% 07/03/06 %% %% 07/03/06 %% %% depose sur la pile diverses dimensions concernant la boite a afficher %% 07/03/06 %% /depose_dim { %% 07/03/06 %% pict_wd vect_scale pop mul %% 07/03/06 %% pict_ht vect_scale exch pop mul %% 07/03/06 %% llx vect_scale pop mul %% 07/03/06 %% lly vect_scale exch pop mul %% 07/03/06 %% wx vect_scale pop mul %% 07/03/06 %% wy vect_scale exch pop mul %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% recupere sur la pile diverses dimensions concernant la boite a afficher %% 07/03/06 %% /charge_dim { %% 07/03/06 %% /wy exch def %% 07/03/06 %% /wx exch def %% 07/03/06 %% /lly exch def %% 07/03/06 %% /llx exch def %% 07/03/06 %% /pict_ht exch def %% 07/03/06 %% /pict_wd exch def %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% les switchs pour encadrement rectangulaire %% 07/03/06 %% /boxit { %% 07/03/06 %% /with_box true def %% 07/03/06 %% } def %% 07/03/06 %% /boxit_all { %% 07/03/06 %% /with_box true def %% 07/03/06 %% /remove_boxit {} def %% 07/03/06 %% } def %% 07/03/06 %% /boxit_none { %% 07/03/06 %% /with_box false def %% 07/03/06 %% /remove_boxit { %% 07/03/06 %% /with_box false store %% 07/03/06 %% } def %% 07/03/06 %% } def %% 07/03/06 %% boxit_none %% 07/03/06 %% %% 07/03/06 %% %% les switchs pour encadrement circulaire %% 07/03/06 %% /circleit { %% 07/03/06 %% /with_circbox true def %% 07/03/06 %% } def %% 07/03/06 %% /circleit_all { %% 07/03/06 %% /with_circbox true def %% 07/03/06 %% /remove_circleit {} def %% 07/03/06 %% } def %% 07/03/06 %% /circleit_none { %% 07/03/06 %% /with_circbox false def %% 07/03/06 %% /remove_circleit { %% 07/03/06 %% /with_circbox false store %% 07/03/06 %% } def %% 07/03/06 %% } def %% 07/03/06 %% circleit_none %% 07/03/06 %% %% 07/03/06 %% %% les switchs pour encadrement Circulaire (cercle de rayon constant) %% 07/03/06 %% /Circleit { %% 07/03/06 %% /with_Circbox true def %% 07/03/06 %% } def %% 07/03/06 %% /Circleit_all { %% 07/03/06 %% /with_Circbox true def %% 07/03/06 %% /remove_Circleit {} def %% 07/03/06 %% } def %% 07/03/06 %% /Circleit_none { %% 07/03/06 %% /with_Circbox false def %% 07/03/06 %% /remove_Circleit { %% 07/03/06 %% /with_Circbox false store %% 07/03/06 %% } def %% 07/03/06 %% } def %% 07/03/06 %% Circleit_none %% 07/03/06 %% %% 07/03/06 %% %% les switchs pour encadrement losange (diamond) %% 07/03/06 %% /diaboxit { %% 07/03/06 %% /with_diabox true def %% 07/03/06 %% } def %% 07/03/06 %% /diaboxit_all { %% 07/03/06 %% /with_diabox true def %% 07/03/06 %% /remove_diaboxit {} def %% 07/03/06 %% } def %% 07/03/06 %% /diaboxit_none { %% 07/03/06 %% /with_diabox false def %% 07/03/06 %% /remove_diaboxit { %% 07/03/06 %% /with_diabox false store %% 07/03/06 %% } def %% 07/03/06 %% } def %% 07/03/06 %% diaboxit_none %% 07/03/06 %% %% 07/03/06 %% %% les switchs pour encadrement losange (diamond) %% 07/03/06 %% /ovalit { %% 07/03/06 %% /with_oval true def %% 07/03/06 %% } def %% 07/03/06 %% /ovalit_all { %% 07/03/06 %% /with_oval true def %% 07/03/06 %% /remove_ovalit {} def %% 07/03/06 %% } def %% 07/03/06 %% /ovalit_none { %% 07/03/06 %% /with_oval false def %% 07/03/06 %% /remove_ovalit { %% 07/03/06 %% /with_oval false store %% 07/03/06 %% } def %% 07/03/06 %% } def %% 07/03/06 %% ovalit_none %% 07/03/06 %% %% 07/03/06 %% %% attention, ne peut etre appele que de l'interieur de p@cturee, utilise %% 07/03/06 %% %% un dictionnaire local a cette fonction %% 07/03/06 %% %% trace le cercle entourant la boite a afficher %% 07/03/06 %% /circl@it_l@bel { %% 07/03/06 %% gsave %% 07/03/06 %% 2 dict begin %% 07/03/06 %% %% point extremal 1 %% 07/03/06 %% llx lly ptojpoint pict_transform /circlept1 defpoint %% 07/03/06 %% %% point extremal 2 %% 07/03/06 %% wx wy ptojpoint pict_transform /circlept2 defpoint %% 07/03/06 %% %% 07/03/06 %% drawpicture { %% 07/03/06 %% circlept1 circlept2 milieu %% centre %% 07/03/06 %% dupp circlept1 distance %% rayon %% 07/03/06 %% cercle* %% 07/03/06 %% } if %% 07/03/06 %% %% sauvegarde des donnees en cas de declaration de cnode %% 07/03/06 %% cn@deencours { %% 07/03/06 %% n@dedict %% 07/03/06 %% /noderayon %% 07/03/06 %% circlept1 circlept2 milieu %% 07/03/06 %% circlept1 distance %% 07/03/06 %% put %% 07/03/06 %% } if %% 07/03/06 %% end %% 07/03/06 %% grestore %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /Circleradius .5 def %% 07/03/06 %% %% attention, ne peut etre appele que de l'interieur de p@cturee, utilise %% 07/03/06 %% %% un dictionnaire local a cette fonction %% 07/03/06 %% %% trace le cercle entourant la boite a afficher %% 07/03/06 %% /Circl@it_l@bel { %% 07/03/06 %% gsave %% 07/03/06 %% 2 dict begin %% 07/03/06 %% %% point extremal 1 %% 07/03/06 %% llx lly ptojpoint pict_transform /Circlept1 defpoint %% 07/03/06 %% %% point extremal 2 %% 07/03/06 %% wx wy ptojpoint pict_transform /Circlept2 defpoint %% 07/03/06 %% %% 07/03/06 %% drawpicture { %% 07/03/06 %% Circlept1 Circlept2 milieu %% centre %% 07/03/06 %% Circleradius %% rayon %% 07/03/06 %% cercle* %% 07/03/06 %% } if %% 07/03/06 %% %% sauvegarde des donnees en cas de declaration de cnode %% 07/03/06 %% Cn@deencours { %% 07/03/06 %% n@dedict /noderayon Circleradius put %% 07/03/06 %% } if %% 07/03/06 %% end %% 07/03/06 %% grestore %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% attention, ne peut etre appele que de l'interieur de p@cturee, utilise %% 07/03/06 %% %% un dictionnaire local a cette fonction %% 07/03/06 %% %% trace le rectangle encadrant la boite a afficher %% 07/03/06 %% /diab@xit_l@bel { %% 07/03/06 %% gsave %% 07/03/06 %% 2 dict begin %% 07/03/06 %% wx llx add 2 div lly wy add 2 div ptojpoint pict_transform %% cc %% 07/03/06 %% wx lly wy add 2 div ptojpoint pict_transform %% cr %% 07/03/06 %% vecteur /u defpoint %% 07/03/06 %% wx llx add 2 div lly wy add 2 div ptojpoint pict_transform %% cc %% 07/03/06 %% wx llx add 2 div wy ptojpoint pict_transform %% uc %% 07/03/06 %% vecteur /v defpoint %% 07/03/06 %% wx lly wy add 2 div ptojpoint pict_transform %% cr %% 07/03/06 %% u addv /rdia defpoint %% 07/03/06 %% llx lly wy add 2 div ptojpoint pict_transform %% cl %% 07/03/06 %% u subv /ldia defpoint %% 07/03/06 %% wx llx add 2 div wy ptojpoint pict_transform %% uc %% 07/03/06 %% v addv /udia defpoint %% 07/03/06 %% wx llx add 2 div lly ptojpoint pict_transform %% dc %% 07/03/06 %% v subv /ddia defpoint %% 07/03/06 %% [udia ldia ddia rdia] %% 07/03/06 %% %% Pictdic /rdia [ rdia ] cvx put %% 07/03/06 %% %% Pictdic /ldia [ ldia ] cvx put %% 07/03/06 %% %% Pictdic /udia [ udia ] cvx put %% 07/03/06 %% %% Pictdic /ddia [ ddia ] cvx put %% 07/03/06 %% drawpicture { %% 07/03/06 %% with_oval { %% 07/03/06 %% pol2ell ellipse* %% 07/03/06 %% % remove_ovalit %% 07/03/06 %% } { %% 07/03/06 %% polygone* %% 07/03/06 %% % remove_diaboxit %% 07/03/06 %% } ifelse %% 07/03/06 %% } if %% 07/03/06 %% end %% 07/03/06 %% grestore %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% meme manip que pour p@cture, mais avec un "stranslate" et pas un "smoveto" %% 07/03/06 %% /manip_deplacement_picture { %% 07/03/06 %% M stranslate %% 07/03/06 %% angle_rot rotate %% 07/03/06 %% with_decal {ajustement_p@ct translate} if %% 07/03/06 %% vect_transl translate %% 07/03/06 %% vect_scale scale %% 07/03/06 %% decalage_pictlabel translate %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% attention, ne peut etre appele que de l'interieur de p@cturee, utilise %% 07/03/06 %% %% un dictionnaire local a cette fonction %% 07/03/06 %% %% trace le rectangle encadrant la boite a afficher %% 07/03/06 %% /b@xit_l@bel { %% 07/03/06 %% drawpicture { %% 07/03/06 %% Rn@deencours not { %% 07/03/06 %% [ %% 07/03/06 %% llx lly ptojpoint pict_transform %% 07/03/06 %% wx lly ptojpoint pict_transform %% 07/03/06 %% wx wy ptojpoint pict_transform %% 07/03/06 %% llx wy ptojpoint pict_transform %% 07/03/06 %% ] polygone* %% 07/03/06 %% } { %% 07/03/06 %% gsave %% 07/03/06 %% newpath %% 07/03/06 %% [ %% 07/03/06 %% llx lly ptojpoint pict_transform %% 07/03/06 %% wx lly ptojpoint pict_transform %% 07/03/06 %% wx wy ptojpoint pict_transform %% 07/03/06 %% llx wy ptojpoint pict_transform %% 07/03/06 %% ] polygone_ %% 07/03/06 %% fillstyle %% 07/03/06 %% closepath %% 07/03/06 %% grestore %% 07/03/06 %% /Rn@deencours false store %% 07/03/06 %% } ifelse %% 07/03/06 %% } if %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% recupere le nom de l'objet, initialise les methodes 'picture' %% 07/03/06 %% %% et 'picture_dim', puis charge les defs des points speciaux de %% 07/03/06 %% %% l'objet dans le dictionnaire Pictdic %% 07/03/06 %% /recup_pict_name { %% 07/03/06 %% 13 dict begin %% le dictionnaire sera ferme par la procedure p@cture %% 07/03/06 %% /picture_name exch def %% 07/03/06 %% /picture picture_name cvx def %% 07/03/06 %% /picture_dim picture_name (_dim) append cvx def %% 07/03/06 %% %% y a-t-il des points definis pour l'objet ? %% 07/03/06 %% /objdic_name picture_name (_dic) append cvn def %% 07/03/06 %% %% 30/04/05 %% %% on copie le dictionnaire des points ds Pictdic %% 07/03/06 %% %% 30/04/05 %% objdic_name where %% 07/03/06 %% %% 30/04/05 %% {pop objdic_name load Pictdic copy pop} %% 07/03/06 %% %% 30/04/05 %% if %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% recupere les 3 arguments optionnels passes a une commande de pict %% 07/03/06 %% %% et initialise les parametres internes angle_rot, vect_transl et %% 07/03/06 %% %% vect_scale %% 07/03/06 %% /recup_opt { %% 07/03/06 %% /angle_rot 0 def %% 07/03/06 %% /vect_transl {0 0} def %% 07/03/06 %% /vect_scale {1 1} def %% 07/03/06 %% /with_decal true def %% 07/03/06 %% dup xcheck %% y a-t-il un angle specifie ? %% 07/03/06 %% {/angle_rot exch store} %% oui, on le stocke %% 07/03/06 %% if %% 07/03/06 %% dup isarray %% y a-t-il une scaling specifie %% 07/03/06 %% {/vect_scale exch cvx def} %% oui, on le stocke %% 07/03/06 %% if %% 07/03/06 %% dup isstring %% 07/03/06 %% { %% 07/03/06 %% dup length 0 eq %% 07/03/06 %% { %% 07/03/06 %% /with_decal false def %% 07/03/06 %% pop %% 07/03/06 %% } %% 07/03/06 %% { %% 07/03/06 %% /vect_transl exch cvx def %% 07/03/06 %% } %% 07/03/06 %% ifelse %% 07/03/06 %% } %% 07/03/06 %% if %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% syntaxe : pict x y boxpictdim --> pict x y llx lly wx wy, en tenant compte %% 07/03/06 %% %% de l'encadrement %% 07/03/06 %% %% attention, doit laisser la pile intacte %% 07/03/06 %% /boxpictdim { %% 07/03/06 %% %% la commande livree avec l'objet passe a 'picture' indiquant la %% 07/03/06 %% %% BB en picas de cet objet %% 07/03/06 %% picture_dim %% 07/03/06 %% %% il faut maintenant tenir compte de l'encadrement %% 07/03/06 %% with_box with_circbox or %% 07/03/06 %% { %% 07/03/06 %% dx_boxit dy_boxit addv %% 07/03/06 %% exchp %% 07/03/06 %% dx_boxit dy_boxit subv %% 07/03/06 %% exchp %% 07/03/06 %% } %% 07/03/06 %% if %% 07/03/06 %% with_oval with_diabox or %% 07/03/06 %% { %% 07/03/06 %% diax_boxit diay_boxit addv %% 07/03/06 %% exchp %% 07/03/06 %% diax_boxit diay_boxit subv %% 07/03/06 %% exchp %% 07/03/06 %% } %% 07/03/06 %% if %% 07/03/06 %% %% ici on calcule en cas d'oval ou diabox %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% syntaxe : pict x y recup_dim_pict --> stocke width et height de la %% 07/03/06 %% %% boite contenant pict dans les variables pict_wd et pict_ht, et stocke %% 07/03/06 %% %% les coordonees llx, lly, wx et wy %% 07/03/06 %% /recup_dim_pict { %% 07/03/06 %% boxpictdim %% 07/03/06 %% /wy exch def %% 07/03/06 %% /wx exch def %% 07/03/06 %% /lly exch def %% 07/03/06 %% /llx exch def %% 07/03/06 %% llx lly wx wy %% 07/03/06 %% vecteur %% 07/03/06 %% /pict_ht exch def %% 07/03/06 %% /pict_wd exch def %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% preliminaire a un nouvel affichage par p@cture : %% 07/03/06 %% %% - nettoyage du dictionnaire Pictdic %% 07/03/06 %% %% - restoration du dictionnaire sauvegarde secondPictdic %% 07/03/06 %% %% - lecture des différents arguments sur la pile (nom de l'objet, options %% 07/03/06 %% %% - d'angle, de deplacement, de scaling) %% 07/03/06 %% %% - initialisation de differentes variables (dimension de l'objet,...) %% 07/03/06 %% /init_pict { %% 07/03/06 %% cleartmpPictdict %% 07/03/06 %% clearPictdic %% 07/03/06 %% restorePictdic %% 07/03/06 %% recup_pict_name %% 07/03/06 %% recup_opt %% 07/03/06 %% recup_dim_pict %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% syntaxe : x y pict_transform %% 07/03/06 %% %% --> X Y, transforme du point (x, y) ds le repere jps %% 07/03/06 %% /pict_transform { %% 07/03/06 %% 12 dict begin %% 07/03/06 %% jtoppoint %% 07/03/06 %% /y exch def %% 07/03/06 %% /x exch def %% 07/03/06 %% %% le scale %% 07/03/06 %% /sx vect_scale pop def %% 07/03/06 %% /sy vect_scale exch pop def %% 07/03/06 %% %% le decalage %% 07/03/06 %% /xd decalage_pictlabel pop def %% 07/03/06 %% /yd decalage_pictlabel exch pop def %% 07/03/06 %% %% l'ajustement_p@ct %% 07/03/06 %% with_decal { %% 07/03/06 %% /xa ajustement_p@ct pop def %% 07/03/06 %% /ya ajustement_p@ct exch pop def %% 07/03/06 %% } { %% 07/03/06 %% /xa 0 def %% 07/03/06 %% /ya 0 def %% 07/03/06 %% } ifelse %% 07/03/06 %% %% la translation %% 07/03/06 %% /xt vect_transl pop def %% 07/03/06 %% /yt vect_transl exch pop def %% 07/03/06 %% /a sx xd mul xa add xt add def %% 07/03/06 %% /b sy yd mul ya add yt add def %% 07/03/06 %% %% 07/03/06 %% sx angle_rot cos mul x mul %% 07/03/06 %% sy angle_rot sin mul y mul sub %% 07/03/06 %% sx angle_rot sin mul x mul %% 07/03/06 %% sy angle_rot cos mul y mul add %% 07/03/06 %% %% 07/03/06 %% a angle_rot cos mul b angle_rot sin mul sub %% 07/03/06 %% a angle_rot sin mul b angle_rot cos mul add %% 07/03/06 %% addv %% 07/03/06 %% ptojpoint %% 07/03/06 %% M addv %% 07/03/06 %% end %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% 03/02/05 %% %% syntaxe : pict M dir_x dir_y p@cture ou M dans le repere jps, dx, %% 07/03/06 %% %% 03/02/05 %% %% dy dans le repere ps --> ecrit le picte dont le coin inferieur %% 07/03/06 %% %% 03/02/05 %% %% gauche de la BB est au point M, avec le decalage (dx, dy). Apres le %% 07/03/06 %% %% 03/02/05 %% %% decalage, applique translation, scale puis rotate definis par les %% 07/03/06 %% %% 03/02/05 %% %% options %% 07/03/06 %% %% 03/02/05 %% /p@cture { %% 07/03/06 %% %% 03/02/05 %% %%gsave %% 07/03/06 %% %% 03/02/05 %% %% ouverture du dictionnaire par recup_opt %% 07/03/06 %% %% 03/02/05 %% /M defpoint %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% Pictdic /dl {0 0 jtoppoint llx lly addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /bl {0 0 jtoppoint llx 0 addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /cl {0 0 jtoppoint llx lly wy add 2 div addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /ul {0 0 jtoppoint llx wy addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% Pictdic /dr {0 0 jtoppoint wx lly addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /br {0 0 jtoppoint wx 0 addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /cr {0 0 jtoppoint wx lly wy add 2 div addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /ur {0 0 jtoppoint wx wy addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% Pictdic /dc {0 0 jtoppoint wx llx add 2 div lly addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /bc {0 0 jtoppoint wx llx add 2 div 0 addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /cc {0 0 jtoppoint wx llx add 2 div lly wy add 2 div addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /uc {0 0 jtoppoint wx llx add 2 div wy addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% Pictdic /db {0 0 jtoppoint 0 lly addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /bb {0 0 jtoppoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /cb {0 0 jtoppoint 0 wy lly add 2 div addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% Pictdic /ub {0 0 jtoppoint 0 wy addv ptojpoint} bind put %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% %% on extrait tous les point de Pictdic %% 07/03/06 %% %% 03/02/05 %% Pictdic {} forall %% 07/03/06 %% %% 03/02/05 %% %% et on leur applique la meme transformation qu'a l'objet %% 07/03/06 %% %% 03/02/05 %% %% global puis on les restocke dans Pictdict %% 07/03/06 %% %% 03/02/05 %% Pictdic length { %% 07/03/06 %% %% 03/02/05 %% exec pict_transform [ 3 1 roll ] cvx store %% 07/03/06 %% %% 03/02/05 %% } repeat %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% %% on pratique les encadrements si necessaire %% 07/03/06 %% %% 03/02/05 %% with_circbox {circl@it_l@bel remove_circleit} if %% 07/03/06 %% %% 03/02/05 %% with_Circbox {Circl@it_l@bel remove_Circleit} if %% 07/03/06 %% %% 03/02/05 %% with_box {b@xit_l@bel remove_boxit} if %% 07/03/06 %% %% 03/02/05 %% with_diabox with_oval or {diab@xit_l@bel} if %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% gsave %% 07/03/06 %% %% 03/02/05 %% %% ici on met un "smoveto" pour conserver le point courant a la %% 07/03/06 %% %% 03/02/05 %% %% fin du dessin %% 07/03/06 %% %% 03/02/05 %% M smoveto %% 07/03/06 %% %% 03/02/05 %% angle_rot rotate %% 07/03/06 %% %% 03/02/05 %% with_decal {ajustement_p@ct rmoveto} if %% 07/03/06 %% %% 03/02/05 %% vect_transl rmoveto %% 07/03/06 %% %% 03/02/05 %% vect_scale scale %% 07/03/06 %% %% 03/02/05 %% decalage_pictlabel rmoveto %% 07/03/06 %% %% 03/02/05 %% picture %% 07/03/06 %% %% 03/02/05 %% currentpoint /save_current_point defpoint %% 07/03/06 %% %% 03/02/05 %% grestore %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% save_current_point moveto %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% n@deencours dian@deencours or %% 07/03/06 %% %% 03/02/05 %% ovaln@deencours or cn@deencours or Cn@deencours or { %% 07/03/06 %% %% 03/02/05 %% %% on extrait tous les point de Pictdic %% 07/03/06 %% %% 03/02/05 %% Pictdic {} forall %% 07/03/06 %% %% 03/02/05 %% %% et on les stocke dans n@dedict %% 07/03/06 %% %% 03/02/05 %% Pictdic length { %% 07/03/06 %% %% 03/02/05 %% n@dedict 3 1 roll put %% 07/03/06 %% %% 03/02/05 %% } repeat %% 07/03/06 %% %% 03/02/05 %% ovaln@deencours {n@dedict /nodetype /oval put } if %% 07/03/06 %% %% 03/02/05 %% /n@deencours false store %% 07/03/06 %% %% 03/02/05 %% /dian@deencours false store %% 07/03/06 %% %% 03/02/05 %% /ovaln@deencours false store %% 07/03/06 %% %% 03/02/05 %% } if %% 07/03/06 %% %% 03/02/05 %% %% 07/03/06 %% %% 03/02/05 %% transmet_dim {depose_dim} if %% 07/03/06 %% %% 03/02/05 %% end %% 07/03/06 %% %% 03/02/05 %% transmet_dim {charge_dim} if %% 07/03/06 %% %% 03/02/05 %% } def %% 07/03/06 %% %% 07/03/06 %% %% syntaxe : x y str_pict brpict %% 07/03/06 %% %% avec eventuellement les arguments optionnels %% 07/03/06 %% %% <{angle_rot} (vect_transl) [vect_scale]> %% 07/03/06 %% /brpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {hadjust 0} def %% 07/03/06 %% /decalage_pictlabel {llx neg 0} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /bbpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 0} def %% 07/03/06 %% /decalage_pictlabel {0 0} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /blpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {hadjust neg 0} def %% 07/03/06 %% /decalage_pictlabel {wx neg 0} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /bcpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 0} def %% 07/03/06 %% /decalage_pictlabel {wx llx add -.5 mul 0} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /ubpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 vadjust} def %% 07/03/06 %% /decalage_pictlabel {0 lly neg} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /urpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {hadjust vadjust} def %% 07/03/06 %% /decalage_pictlabel {llx neg lly neg} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /ulpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {hadjust neg vadjust} def %% 07/03/06 %% /decalage_pictlabel {wx neg lly neg} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /ucpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 vadjust} def %% 07/03/06 %% /decalage_pictlabel {llx wx add -.5 mul lly neg} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /drpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {hadjust vadjust neg} def %% 07/03/06 %% /decalage_pictlabel {llx neg wy neg} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /dbpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 vadjust neg} def %% 07/03/06 %% /decalage_pictlabel {0 wy neg} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /dlpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {hadjust neg vadjust neg} def %% 07/03/06 %% /decalage_pictlabel {wx neg wy neg} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /dcpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 vadjust neg} def %% 07/03/06 %% /decalage_pictlabel {llx wx add -2 div wy neg} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /crpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {hadjust 0} def %% 07/03/06 %% /decalage_pictlabel {llx neg lly wy add -2 div} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /cbpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 0} def %% 07/03/06 %% /decalage_pictlabel {0 lly wy add -2 div} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /clpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {hadjust neg 0} def %% 07/03/06 %% /decalage_pictlabel {wx neg lly wy add -2 div} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /ccpict { %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 0} def %% 07/03/06 %% /decalage_pictlabel {llx wx add lly wy add -.5 mulv} def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /spict { %% 07/03/06 %% %% le 1er arg est-il un litteral %% 07/03/06 %% dup type (nametype) cvn eq %% 07/03/06 %% { %% 07/03/06 %% 2 copy pop %% 07/03/06 %% (_dic) append cvlit load exch %% 07/03/06 %% get exec %% 07/03/06 %% } %% 07/03/06 %% if %% 07/03/06 %% jtoppoint %% 07/03/06 %% /le_y exch def %% 07/03/06 %% /le_x exch def %% 07/03/06 %% init_pict %% 07/03/06 %% /ajustement_p@ct {0 0} def %% 07/03/06 %% /decalage_pictlabel { %% 07/03/06 %% le_x le_y -1 mulv %% 07/03/06 %% } def %% 07/03/06 %% p@cture %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% %% ======================================================= %% 07/03/06 %% /drawpicture true def %% 07/03/06 %% %% 07/03/06 %% %% syntaxe : pict M dir_x dir_y p@cture ou M dans le repere jps, dx, %% 07/03/06 %% %% dy dans le repere ps --> ecrit le picte dont le coin inferieur %% 07/03/06 %% %% gauche de la BB est au point M, avec le decalage (dx, dy). Apres le %% 07/03/06 %% %% decalage, applique translation, scale puis rotate definis par les %% 07/03/06 %% %% options %% 07/03/06 %% /p@cture { %% 07/03/06 %% %%gsave %% 07/03/06 %% %% ouverture du dictionnaire par recup_opt %% 07/03/06 %% /M defpoint %% 07/03/06 %% %% 07/03/06 %% %% currentpictpoints { %% 07/03/06 %% %% Pictdic /dl {0 0 jtoppoint llx lly addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /bl {0 0 jtoppoint llx 0 addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /cl {0 0 jtoppoint llx lly wy add 2 div addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /ul {0 0 jtoppoint llx wy addv ptojpoint} bind put %% 07/03/06 %% %% %% 07/03/06 %% %% Pictdic /dr {0 0 jtoppoint wx lly addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /br {0 0 jtoppoint wx 0 addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /cr {0 0 jtoppoint wx lly wy add 2 div addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /ur {0 0 jtoppoint wx wy addv ptojpoint} bind put %% 07/03/06 %% %% %% 07/03/06 %% %% Pictdic /dc {0 0 jtoppoint wx llx add 2 div lly addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /bc {0 0 jtoppoint wx llx add 2 div 0 addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /cc {0 0 jtoppoint wx llx add 2 div lly wy add 2 div addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /uc {0 0 jtoppoint wx llx add 2 div wy addv ptojpoint} bind put %% 07/03/06 %% %% %% 07/03/06 %% %% Pictdic /db {0 0 jtoppoint 0 lly addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /bb {0 0 jtoppoint } bind put %% 07/03/06 %% %% Pictdic /cb {0 0 jtoppoint 0 wy lly add 2 div addv ptojpoint} bind put %% 07/03/06 %% %% Pictdic /ub {0 0 jtoppoint 0 wy addv ptojpoint} bind put %% 07/03/06 %% %% } if %% 07/03/06 %% %% 07/03/06 %% currentpictpoints { %% 07/03/06 %% Pictdic /dl {llx lly ptojpoint} bind put %% 07/03/06 %% Pictdic /bl {llx 0 ptojpoint} bind put %% 07/03/06 %% Pictdic /cl {llx lly wy add 2 div ptojpoint} bind put %% 07/03/06 %% Pictdic /ul {llx wy ptojpoint} bind put %% 07/03/06 %% Pictdic /dr {wx lly ptojpoint} bind put %% 07/03/06 %% Pictdic /br {wx 0 ptojpoint} bind put %% 07/03/06 %% Pictdic /cr {wx lly wy add 2 div ptojpoint} bind put %% 07/03/06 %% Pictdic /ur {wx wy ptojpoint} bind put %% 07/03/06 %% Pictdic /dc {wx llx add 2 div lly ptojpoint} bind put %% 07/03/06 %% Pictdic /bc {wx llx add 2 div 0 ptojpoint} bind put %% 07/03/06 %% Pictdic /cc {wx llx add 2 div lly wy add 2 div ptojpoint} bind put %% 07/03/06 %% Pictdic /uc {wx llx add 2 div wy ptojpoint} bind put %% 07/03/06 %% Pictdic /db {0 lly ptojpoint} bind put %% 07/03/06 %% Pictdic /bb {0 0 ptojpoint} bind put %% 07/03/06 %% Pictdic /cb {0 wy lly add 2 div ptojpoint} bind put %% 07/03/06 %% Pictdic /ub {0 wy ptojpoint} bind put %% 07/03/06 %% } if %% 07/03/06 %% %% 07/03/06 %% with_circbox {circl@it_l@bel remove_circleit} if %% 07/03/06 %% with_Circbox {Circl@it_l@bel remove_Circleit} if %% 07/03/06 %% with_box {b@xit_l@bel remove_boxit} if %% 07/03/06 %% with_diabox with_oval or {diab@xit_l@bel} if %% 07/03/06 %% %% 07/03/06 %% drawpicture { %% 07/03/06 %% gsave %% 07/03/06 %% %% ici on met un "smoveto" pour conserver le point courant a la %% 07/03/06 %% %% fin du dessin %% 07/03/06 %% M smoveto %% 07/03/06 %% angle_rot rotate %% 07/03/06 %% with_decal {ajustement_p@ct rmoveto} if %% 07/03/06 %% vect_transl rmoveto %% 07/03/06 %% vect_scale scale %% 07/03/06 %% decalage_pictlabel rmoveto %% 07/03/06 %% picture %% 07/03/06 %% currentpoint /save_current_point defpoint %% 07/03/06 %% grestore %% 07/03/06 %% save_current_point moveto %% 07/03/06 %% } { %% 07/03/06 %% %% il ne faut faire le pop que si on n'a pas de texlabel %% 07/03/06 %% picture_name length 8 ne {pop} if %% 07/03/06 %% }ifelse %% 07/03/06 %% %% 07/03/06 %% %% si on etait en dianode, on rajoute les diapoint ds Pictdict %% 07/03/06 %% with_diabox with_oval or { %% 07/03/06 %% 2 dict begin %% 07/03/06 %% wx llx add 2 div lly wy add 2 div ptojpoint %% cc %% 07/03/06 %% wx lly wy add 2 div ptojpoint %% cr %% 07/03/06 %% vecteur /u defpoint %% 07/03/06 %% wx llx add 2 div lly wy add 2 div ptojpoint %% cc %% 07/03/06 %% wx llx add 2 div wy ptojpoint %% uc %% 07/03/06 %% vecteur /v defpoint %% 07/03/06 %% wx lly wy add 2 div ptojpoint %% cr %% 07/03/06 %% u addv /rdia defpoint %% 07/03/06 %% llx lly wy add 2 div ptojpoint %% cl %% 07/03/06 %% u subv /ldia defpoint %% 07/03/06 %% wx llx add 2 div wy ptojpoint %% uc %% 07/03/06 %% v addv /udia defpoint %% 07/03/06 %% wx llx add 2 div lly ptojpoint %% dc %% 07/03/06 %% v subv /ddia defpoint %% 07/03/06 %% Pictdic /rdia [ rdia ] cvx put %% 07/03/06 %% Pictdic /ldia [ ldia ] cvx put %% 07/03/06 %% Pictdic /udia [ udia ] cvx put %% 07/03/06 %% Pictdic /ddia [ ddia ] cvx put %% 07/03/06 %% remove_ovalit %% 07/03/06 %% remove_diaboxit %% 07/03/06 %% end %% 07/03/06 %% } if %% 07/03/06 %% %% 07/03/06 %% %% on extrait tous les point de Pictdic %% 07/03/06 %% Pictdic {} forall %% 07/03/06 %% %% 07/03/06 %% %% et on leur applique la meme transformation qu'a l'objet %% 07/03/06 %% %% global puis on les restocke dans Pictdict %% 07/03/06 %% Pictdic length { %% 07/03/06 %% exec pict_transform [ 3 1 roll ] cvx store %% 07/03/06 %% } repeat %% 07/03/06 %% %% 07/03/06 %% %% 07/03/06 %% %% si l'objet a un dictionnaire associe ds l'environnement pict %% 07/03/06 %% objdic_name where { %% 07/03/06 %% pop %% 07/03/06 %% %% on extrait tous les point de objdic %% 07/03/06 %% objdic_name load {} forall %% 07/03/06 %% %% et on leur applique la meme transformation qu'a l'objet %% 07/03/06 %% %% global puis on les restocke dans Pictdict %% 07/03/06 %% objdic_name load length { %% 07/03/06 %% exec pict_transform [ 3 1 roll ] cvx %% 07/03/06 %% Pictdic 3 1 roll put %% 07/03/06 %% } repeat %% 07/03/06 %% } if %% 07/03/06 %% %% 07/03/06 %% n@deencours dian@deencours or %% 07/03/06 %% ovaln@deencours or cn@deencours or Cn@deencours or { %% 07/03/06 %% %% on extrait tous les point de Pictdic %% 07/03/06 %% Pictdic {} forall %% 07/03/06 %% %% et on les stocke dans n@dedict %% 07/03/06 %% Pictdic length { %% 07/03/06 %% n@dedict 3 1 roll put %% 07/03/06 %% } repeat %% 07/03/06 %% ovaln@deencours {n@dedict /nodetype /oval put } if %% 07/03/06 %% /n@deencours false store %% 07/03/06 %% /cn@deencours false store %% 07/03/06 %% /Cn@deencours false store %% 07/03/06 %% /dian@deencours false store %% 07/03/06 %% /ovaln@deencours false store %% 07/03/06 %% loadnodedict { %% 07/03/06 %% %% on extrait tous les point de Pictdic %% 07/03/06 %% Pictdic {} forall %% 07/03/06 %% %% et on les stocke dans tmpPictdict %% 07/03/06 %% Pictdic length { %% 07/03/06 %% exch chaine cvs n@den@mesuffix exch append exch %% 07/03/06 %% tmpPictdict 3 1 roll put %% 07/03/06 %% } repeat %% 07/03/06 %% } if %% 07/03/06 %% } if %% 07/03/06 %% %% 07/03/06 %% transmet_dim {depose_dim} if %% 07/03/06 %% end %% 07/03/06 %% %% on extrait tous les point de tmpPictdic %% 07/03/06 %% tmpPictdict {} forall %% 07/03/06 %% %% et on les stocke dans currentdict %% 07/03/06 %% tmpPictdict length { %% 07/03/06 %% currentdict 3 1 roll put %% 07/03/06 %% } repeat %% 07/03/06 %% transmet_dim {charge_dim} if %% 07/03/06 %% } def %% 07/03/06 %% %% 07/03/06 %% /showpictpoints { %% 07/03/06 %% gsave %% 07/03/06 %% Pictdic {} forall %% 07/03/06 %% %% et on les stocke dans currentdict %% 07/03/06 %% Pictdic length { %% 07/03/06 %% exec dotstyle pop %% 07/03/06 %% } repeat %% 07/03/06 %% grestore %% 07/03/06 %% } def