echo x - README sed 's/^X//' >README <<'*-*-END_of_README-*-*' XPLOT_PS est une librairie de fonctions graphiques ecrites en C, et qui Xgenerent un fichier de dessin constitue de code PostScript pour LN03R. XLe modele graphique est tres proche de celui qui existaient dans les routines XBENSON. Elle permet l'ouverture d'un fichier, le choix des polices de Xcaracteres (type, taille), le dessin de traits, de polygones Xremplis ou non, la rotation des textes et figures, etc... XUn manuel de reference est fourni en source TeX et sortie PostScript, ainsi Xqu'en source nroff et sortie doc. X X Ko fichier X 2 plot_ps.h header a mettre dans le dir du include systeme X 2 extplot_ps.h header pour la compilation des objets X 2 endplot_ps.c \ X 3 iniplot_ps.c | X 2 newpage_ps.c | Les sources de la librairie X 23 plot0_ps.c | X 6 plot2_ps.c / X 19 plot_ps.nroff \ X 26 plot_ps.doc | Le manuel en ascii et X 24 plot_ps.tex | en PostScript X 72 plot_ps.ps / X XCes fonctions ont ete developpees en CC et utilisees sous ULTRIX, Xet testees et utilisees sous VMS (VAXC) et MS/DOS (Microsoft C V5 et Turbo XC). X XATTENTION: dans extplot_ps.h il y a un define UNIX, VMS ou MS_DOS a mettre au Xbon systeme. et dans end_plot.ps, il faut eventuellement changer le nom de Xvotre queue d'impression postscript! X X XAuteur: J-F Vibert X Laboratoire de Physiologie X CHU Saint-Antoine X 27 rue Chaligny X 75571 Paris Cedex 12 X Tel: (1) 43-07-58-34 X *-*-END_of_README-*-* echo x - plot_ps.h sed 's/^X//' >plot_ps.h <<'*-*-END_of_plot_ps.h-*-*' X/* X Fichier de definition des variables utilise par le traceur X */ X#define PL_PAS 28 /* Il y a 28.346 pas par centimetre */ X#define X_PAS 28.346 X#define MAX_OFF 16384 /* Plus grand deplacement en pas */ X#define MAX_PLT 88 /* Minimum 84 pour le DICO */ X/* X * Fichier de travail X */ X FILE *pl_spl; /* Fichier de travail */ X char pl_buf[MAX_PLT+8]; /* Buffer de travail (8 => close) */ X char pl_police[50]; /* Police courante */ X char plot_file[80]; /* nom du fichier de plot */ X int pl_byt; /* Nombre de caracteres dans le buffer */ X/* X * Espace Absolu (Benson) X */ X int pl_x = 0; /* Position de la plume en pas */ X int pl_y = 0; X int ex_x = 0; /* Position actuelle de la plume en pas */ X int ex_y = 0; X X int pl_mode; /* Mode de travail du traceur */ X int pl_cms = 1; /* Flag de travail en espace Benson */ X int draw = 0; /* On est en train de tracer */ X/* X * Espace Sujet X */ X int pl_ex = PL_PAS; /* Echelle : Nombre de pas / Unite U */ X int pl_ey = PL_PAS; X float pl_rex = X_PAS; /* Echelle exprimee en reel */ X float pl_rey = X_PAS; X float hl_crte; /* hauteur des lettres courante */ X int pl_xs = 0; /* Origine sujet en cm. */ X int pl_ys = 0; X int pl_ps_page = 1; /* page courante */ X float pl_ca = 1., pl_sa = 0.; /* Rotation de l'espace Sujet */ X X int pl_plume = 0; /* Plume utilisee : 0 */ X/* X * Descripteur courant de caracteres X */ X float pl_dx, pl_dy; /* Maillage sur X et Y pour recalage R */ X/* X * Code des deplacements de la plume X */ X#define PL_AH 0 /* Absolu Plume Haute */ X#define PL_AB 1 /* Abslou Plume Basse */ X#define PL_RH 2 /* Relatif Plume Haute */ X#define PL_RB 3 /* Relatif Plume Basse */ X X/* X X definitions of Benson colours for PLUME() X X*/ X X#define BLACK 0 X#define NOIR 0 X#define GREEN 1 X#define VERT 1 X#define BLUE 1 X#define BLEU 1 X#define RED 2 X#define ROUGE 2 X X#define BOOLEAN int X *-*-END_of_plot_ps.h-*-* echo x - extplot_ps.h sed 's/^X//' >extplot_ps.h <<'*-*-END_of_extplot_ps.h-*-*' X/* systeme ..... */ X X#define UNIX X/* X#define VMS X#define MS_DOS X*/ X X/* X Fichier de definition des variables utilise par le traceur X */ X X#define PL_PAS 28 /* Il y a 28.346 pas par centimetre */ X#define X_PAS 28.346 X#define MAX_OFF 16384 /* Plus grand deplacement en pas */ X#define MAX_PLT 88 /* Minimum 84 pour le DICO */ X/* X * Fichier de travail X */ X extern FILE *pl_spl; /* Fichier de travail */ X extern char pl_buf[]; /* Buffer de travail (8 => close) */ X extern char pl_police[50]; /* Police courante */ X extern char plot_file[80]; /* nom du fichier de plot */ X extern int pl_byt; /* Nombre de caracteres dans le buffer */ X/* X * Espace Absolu X */ X extern int pl_x; /* Position de la plume en pas */ X extern int pl_y; X extern int ex_x; /* Position actuelle de la plume en pas */ X extern int ex_y; X extern int pl_mode; /* Mode de travail du traceur */ X extern int pl_cms; /* Flag de travail en espace Benson */ X extern int draw; /* On est en train de tracer */ X/* X * Espace Sujet X */ X extern int pl_ex; /* Echelle : Nombre de pas / Unite U */ X extern int pl_ey; X extern float pl_rex, pl_rey; /* Echelle reelle */ X extern int pl_xs; /* Origine sujet en cm. */ X extern int pl_ys; X extern int pl_ps_page; /* page courante */ X extern float hl_crte; /* hauteur des lettres courantes */ X extern float pl_ca, pl_sa; /* Rotation de l'espace Sujet */ X X extern int pl_plume; /* Plume utilisee : 0 */ X/* X * Descripteur courant de caracteres X */ X extern float pl_dx, pl_dy; /* Maille en X et Y : Recalle 0 */ X/* X * Code des deplacements de la plume X */ X#define PL_AH 0 /* Absolu Plume Haute */ X#define PL_AB 1 /* Abslou Plume Basse */ X#define PL_RH 2 /* Relatif Plume Haute */ X#define PL_RB 3 /* Relatif Plume Basse */ *-*-END_of_extplot_ps.h-*-* echo x - endplot_ps.c sed 's/^X//' >endplot_ps.c <<'*-*-END_of_endplot_ps.c-*-*' X/* X* X* ENDPLOT() permet de terminer et spooler la benson. Il appelle plclose() X* et spoole eventuellement en l'effacant, le dessin X* X*/ X#include X#include "extplot_ps.h" X X#ifdef DOCUMENTATION X Xtitle ENDPLOT Close and spools the PostScript file Xindex Close and spools the PostScript file X X Xsynoptique X X .nf X #include X X endplot(file,action); X char action; /* Action to take about the plot file X X s: spool and keep X d: spool and delete X f: freeze (no spool) X */ X .f X Xdescription X X ENDPLOT closes the PostScript file and process it according X to the action indicated by the char argument: X X s: spool and keep X X d: spool and delete X X f: freeze (no spool) X Xauthor X X Dr Jean-Francois Vibert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X plopen() and plclose() X#endif X Xextern plclose(); X Xendplot(file_sp,action) Xchar *file_sp, X action; /* Action to take about the plot file X s: spool and keep X d: spool and delete X f: freeze (no spool) X */ X{ X char ligne[80]; X register len, status; X X plclose(); /* fermeture du fichier */ X X if (!strlen(file_sp)) strcpy(file_sp,plot_file); X#ifedf UNIX X sprintf(ligne,"lpr -P3 %s",file_sp); X#endif X#ifedf VMS X sprintf(ligne,"PRINT /QUEUE=POSTSCRIPT %s",file_sp); X#endif X#ifedf MS_DOS X sprintf(ligne,"PRINT %s",file_sp); X#endif X X switch (action) X { X X case 'd': X system(ligne); X#ifedf UNIX X sprintf(ligne,"rm %s",file_sp); X#endif X#ifedf VMS X sprintf(ligne,"DELETE %s;*",file_sp); X#endif X#ifedf MS_DOS X sprintf(ligne,"DEL %s",file_sp); X#endif X system(ligne); X break; X X case 'f': X return; X X case 's': X default: X system(ligne); X } X} *-*-END_of_endplot_ps.c-*-* echo x - iniplot_ps.c sed 's/^X//' >iniplot_ps.c <<'*-*-END_of_iniplot_ps.c-*-*' X/* X* X* INIPLOT() permet d'initialiser la benson. Il appelle plopen() X* et dessine la baniere X* X*/ X#ifdef DOCUMENTATION X Xtitle INIPLOT Initialize the PostScript plotter Xindex Initialize the PostScript plotter X X Xsynoptique X X .nf X #include X X iniplot(plot_file,paper); X char *plot_file; File for the plot X float paper; Paper width in cm X .f X Xdescription X X INIPLOT opens the PostScript file and draws a frame corresponding a X the flag page of a line-printer X Xauthor X X Dr Jean-Francois Vibert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X plopen() and plclose() X#endif X X#include X#include "extplot_ps.h" X#ifdef UNIX X# include X# include X# include X# include X#endif X Xiniplot(la_plot_file,paper) Xchar *la_plot_file; /* File for the plot */ Xfloat paper; /* Paper width in cm */ X{ X char proprio[25], moment[26], page[5]; X#ifdef UNIX X struct utsname sys_name, *p_sys_name; X long tim, *p_tim; X X p_sys_name = &sys_name; X p_tim = &tim; X tim = time(0); X sprintf(moment,"%s",ctime(p_tim)); X moment[(strlen(moment)-1)] = 0; /* enleve le '\n' final */ X uname(p_sys_name); X sprintf(proprio,"%s@%s",getlogin(),p_sys_name->nodename); X#endif X#ifdef VMS X strcpy(moment,"now..."); X strcpy(proprio,"VAX/VMS"); X#endif X#ifdef MS_DOS X strcpy(moment,"now..."); X strcpy(proprio,"MS/DOS"); X#endif X X strcpy(plot_file,la_plot_file); /* pour pl_newpage */ X X plopen(plot_file); X fprintf(pl_spl,"%%!PLOT0_PS V0\n%%%%Creator: %s\n",proprio); X fprintf(pl_spl,"%%%%Title: %s\n",plot_file); X fprintf(pl_spl,"%%%%CreationDate: %s\n",moment); X fprintf(pl_spl,"%%%%EndComments\n"); X fprintf(pl_spl,"save\n"); X X /* Le cadre de flag-page */ X X traa(0.8,0.8,PL_AH); X traa(19.5,0.,PL_RB); X traa(0.,1.,PL_RB); X traa(-19.5,0.,PL_RB); X traa(0.,-1.,PL_RB); X traa(18.5,0.,PL_RH); X traa(0.,1.,PL_RB); X X traa(1.,1.15,PL_AH); X X /* le texte de la baniere */ X X police("Times-Roman",0.4); X pcara(0.,0.,PL_RH,moment,0.4,0); X traa(8.,1.1,PL_AH); X police("NewCenturySchlbk-BoldItalic",0.5); X pcara(0.,0.,PL_RH,plot_file,0.5,0); X traa(17.,1.15,PL_AH); X police("Times-Roman",0.4); X pcara(0.,0.,PL_RH,proprio,0.4,0); X traa(19.5,1.15,PL_AH); X sprintf(page,"%2d",pl_ps_page); X pcara(0.,0.,PL_RH,page,0.4,0); X X traa(0.,0.,PL_AH); X X /* Mise en place pour le dessin */ X X pnuma(1.,2.,0.,0.); X} *-*-END_of_iniplot_ps.c-*-* echo x - newpage_ps.c sed 's/^X//' >newpage_ps.c <<'*-*-END_of_newpage_ps.c-*-*' X/* X* X* PL_NEWPAGE permet de changer de page. X* il redessine dessine la baniere et numerote les pages X* X*/ X#ifdef DOCUMENTATION X Xtitle PL_NEWPAGE Go to the next page Xindex Go to the next page X X Xsynoptique X X .nf X #include X X pl_newpage() X .f X Xdescription X X PL_NEWPAGE go to the next page and redraw the banner and numbers the pages X Xauthor X X Dr Jean-Francois Vibert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X X#endif X X#include X#include X#include X#include X#include X#include "extplot_ps.h" X Xpl_newpage() X{ X char proprio[25], moment[26], page[5]; X struct utsname sys_name, *p_sys_name; X long tim, *p_tim; X X p_sys_name = &sys_name; X p_tim = &tim; X tim = time(0); X sprintf(moment,"%s",ctime(p_tim)); X moment[(strlen(moment)-1)] = 0; /* enleve le '\n' final */ X uname(p_sys_name); X sprintf(proprio,"%s@%s",getlogin(),p_sys_name->nodename); X X fprintf(pl_spl,"showpage\n"); X pl_ps_page++; X X /* Le cadre de flag-page */ X X traa(0.8,0.8,PL_AH); X traa(19.5,0.,PL_RB); X traa(0.,1.,PL_RB); X traa(-19.5,0.,PL_RB); X traa(0.,-1.,PL_RB); X traa(18.5,0.,PL_RH); X traa(0.,1.,PL_RB); X X traa(1.,1.15,PL_AH); X X /* le texte de la baniere */ X X police("Times-Roman",0.4); X pcara(0.,0.,PL_RH,moment,0.4,0); X traa(8.,1.1,PL_AH); X police("NewCenturySchlbk-BoldItalic",0.5); X pcara(0.,0.,PL_RH,plot_file,0.5,0); X traa(17.,1.15,PL_AH); X police("Times-Roman",0.4); X pcara(0.,0.,PL_RH,proprio,0.4,0); X traa(19.5,1.15,PL_AH); X sprintf(page,"%2d",pl_ps_page); X pcara(0.,0.,PL_RH,page,0.4,0); X X traa(0.,0.,PL_AH); X X /* Mise en place pour le dessin */ X X pnuma(1.,2.,0.,0.); X} *-*-END_of_newpage_ps.c-*-* echo x - plot0_ps.c sed 's/^X//' >plot0_ps.c <<'*-*-END_of_plot0_ps.c-*-*' X/* X* PLOT0_PS.C --> librairies en mode POSTSCRIPT X* pour la LN03R X*/ X X#include X#include "extplot_ps.h" X X#ifdef DOCUMENTATION X Xtitle PLOT0S Niveau 0 des routines PostScript pour C Xindex Niveau 0 des routines PostScript pour C X Xdescription X .ap X Routines de dessin sur la Laser PostScript X en mode symbolique. X X NIVEAU 0 : Ce jeu de routine regroupe les routines les plus X elementaires qui controlent directement la laser X sans pratiquement d'aide a l'utilisateur. X X ATTENTION : Toute les variables de travail des modules commencent X par 'pl_' X Tous les sous programmes de travail commencent X par 'p_' X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT2_PS X X .pg X Xname ROUTINES_INTERNES Routines internes de travail Xindex Routines internes de travail X Xdescription X .ap X Routines internes de travail pour X creer le fichier de dessin pour la PostScipt. X X NIVEAU 0 : Ce jeu de routine regroupe les routines les plus X elementaires qui controlent directement le traceur X sans pratiquement d'aide a l'utilisateur. X X ATTENTION : Toute les variables de travail des modules commencent X par 'pl_' X Tous les sous programmes de travail commencent X par 'p_' X X P_DEPL X Envoi un groupe de 2 valeurs x,y au format PostScipt avec gestion X du deplacement et de la plume X X P_PUTS X Envoi une chaine de caracteres avec le dernier format (hx,hy,cosa,sina) X utilise X X PLOT X Deplace la plume au point indique, actualise la position courante X X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT2_PS X X .pg X Xname TRAA Move the pen in PostScipt space (in cm) Xindex Move the pen in PostScipt space (in cm) X Xsynoptique X X .nf X #include X X traa(x,y,j); X float x, y; x and y coordinates X given in cm X int j; the Benson j parameter X .f X Xdescription X X TRAA replicates the Benson traa fortran routine. X X X and Y are the coordinates of the target given in PostScipt X space (in centimeters). X X These coordinates are considered as absolute (j=0 or j=1) or X relative (j=2 or j=3) according to the value of j. X X During the move, the pen is up (j=0 or j=2) or down X (j=1 or j=3) according to the value of j. X X The following constants are defined in PLOT_PS.H: X X X X * Code des deplacements de la plume X .nf X #define PL_AH 0 Absolu Plume Haute X #define PL_AB 1 Absolu Plume Basse X #define PL_RH 2 Relatif Plume Haute X #define PL_RB 3 Relatif Plume Basse X .f X X Normally it is not necessary to call traa since puser, pcms, X pmover, pmovwa, pdrawr and pdrawa are also defined and easier to use. X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X X XSee also X X PMOVBR and PMOVBA to move the pen X PLINBR and PLINBA to draw a line X .pg X X Xname TRAS Move the pen in subject space (not in cm) Xindex Move the pen in subject space (not in cm) X Xsynoptique X X .nf X #include X X tras(x,y,j); X float x, y; x and y coordinates X given in sbject units m X int j; the Benson j parameter X .f X Xdescription X X TRAS replicates the Benson tras fortran routine. X X X and Y are the coordinates of the target given in subject X units (NOT in centimeters). X X These coordinates are considered as absolute (j=0 or j=1) or X relative (j=2 or j=3) according to the value of j. X X During the move, the pen is up (j=0 or j=2) or down X (j=1 or j=3) according to the value of j. X X The following constants are defined in PLOT.H: X X X X * Code des deplacements de la plume X X #define PL_AH 0 Absolu Plume Haute X #define PL_AB 1 Abslou Plume Basse X #define PL_RH 2 Relatif Plume Haute X #define PL_RB 3 Relatif Plume Basse X X X Normally it is not necessary to call traa since puser, pcms, pmovsr, X pmovsa, plinsr and plinsa are also defined and easier to use. X Xauthor X X Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PMOVSR and PMOVSA to move the pen X PLINSR and PLINSA to draw a line X .pg Xname PLOPEN Initialization of the PostScipt file Xindex Initialization of the PostScipt file X Xsynoptique X X .nf X #include X X plopen(name); X char *name; /* File name of the PostScipt file */ X .f X Xdescription X X PLOPEN: Open the file in wich the plot will be send, X and initialize the plotter. X X It must be called once at the very before using any plotter statement X The working buffer beginning is defined in PLOT.H and has a fixed X length, (that can be modified). X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X INIPLOT and PLCLOSE X X .pg X Xname PCARA Write a string in PostScipt space, stays at the end Xindex Write a string in PostScipt space, stays at the end X Xsynoptique X X .nf X #include X X pcara(x,y,j,str,hx,hy,rot); X float x, y; x and y coordinates X given in PostScipt units (cm) X int j; the Benson j parameter X char *str; the string to write X float hx, hy, character width (hx) and height (hy) X (in cm) X rot; rotation in degres X .f X X Xdescription X X PCARA writes a string at the position indicated by x,y and j, X with the rotation given by cosa and sina, and stays at the end X of the string. X X PCARA replicates the Benson pcara fortran routine. X X X and Y are the coordinates of the target given in PostScipt X units (in centimeters). X X These coordinates are considered as absolute (j=0 or j=1) or X relative (j=2 or j=3) according to the value of j. X X During the move, the pen is up (j=0 or j=2) or down X (j=1 or j=3) according to the value of j. X X The following constants are defined in PLOT_PS.H: X X * Code des deplacements de la plume X X #define PL_AH 0 Absolu Plume Haute X #define PL_AB 1 Abslou Plume Basse X #define PL_RH 2 Relatif Plume Haute X #define PL_RB 3 Relatif Plume Basse X X X X The size of characters is given in centimeters by hx (width) and hy X (height) of the characters. X X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X All text writing functions X X .pg X Xname PCARS Write a string in user space, stays at the end Xindex Write a string in user space, stays at the end X Xsynoptique X X .nf X #include X X pcars(x,y,j,str,hy,rot); X float x, y; x and y coordinates X given in user units (not in cm) X int j; the Benson j parameter X char *str; the string to write X float hy, character height (hy) X (in cm) X rot; rotation X .f X X Xdescription X X PCARS writes a string at the position indicated by x,y and j, X with the rotation given in degre, and stays at the end X of the string. X X PCARS almost replicates the Benson pcars fortran routine. X X X and Y are the coordinates of the target given in user X units (NOT in centimeters). X X These coordinates are considered as absolute (j=0 or j=1) or X relative (j=2 or j=3) according to the value of j. X X During the move, the pen is up (j=0 or j=2) or down X (j=1 or j=3) according to the value of j. X X The following constants are defined in PLOT.H: X X * Code des deplacements de la plume X .nf X #define PL_AH 0 Absolu Plume Haute X #define PL_AB 1 Abslou Plume Basse X #define PL_RH 2 Relatif Plume Haute X #define PL_RB 3 Relatif Plume Basse X X .f X X The size of characters is given in centimeters by hy (height) of the X characters. X X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X All text writing functions X X .pg X Xname PLCLOSE Close the PostScipt file Xindex Close the PostScipt file X Xsynoptique X X .nf X #include X X plclose(); X .f X Xdescription X X PLCLOSE: Stops the plotter and closes the file in wich the X plot has been send. X X The PostScipt file must be send to the plotter in order to be drawn. X The file can be spooled as for any ascii file. X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X X XSee also X X PLOPEN and ENDPLOT X X X .pg X Xname PNUMA Define new origine and move the pen Xindex Define new origine and move the pen X Xsynoptique X X .nf X #include X X pnuma(xf,yf,xa,ya); X float xf, yf, /* Absolute coordinates in cm */ X xa, ya; /* Absolute (en cm) coordinates X of new position */ X .f Xdescription X X PNUMA defines a new absolute origine. The pen if first moved to xf X and yf coordinates. xa and ya corespond to the new coordinates of X the pen. X X All coordinates are given in centimeters (also refered as PostScipt X space). X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X .pg X Xname ECHEL Define scale of drawings (subject versus PostScipt units) Xindex Define scale of drawings (subject versus PostScipt units) X Xsynoptique X X .nf X #include X X BOOLEAN echel(ex,ey,xs,ys,ca,sa); X float ex, ey, /* Number of cms by user unit */ X xs, ys, /* Absolute (en cm) coordinates X of user origine */ X ca, sa; /* Cos and Sin of the drawing X (rotation) */ X .f X Xdescription X X ECHEL Define the scale of the drawing, and its origine in the X PostScipt coordinates (relative to the last call to Pnuma). Its X allows also rotation of the entire drawing. X X The scales must be given in centimeters by user (or subject) X unit. They must have a value greater than 0.008 since the PostScipt X draws one centimeter using 118 steps. If not, the function returns X FALSE. X X The coordinates of the new origine must be given in X PostScipt units, i.e. in centimeters. X X Cosinus and Sinus of the angle of the drawing relative to X the X axis gives a rotation possibility. X X Horizontal endroit: cosa=0. sina=-1. X X Horizontal envers: cosa=0. sina=1. X X Verticalement ascendant: cosa=1. sina=0. X X Verticalement descendant: cosa=-1. sina=0. X X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X .pg X Xname PLUME Change the drawing pen Xindex Change the drawing pen X Xsynoptique X X .nf X #include X X BOOLEAN plume(k); X int k; /* pen number (0, 1 or 2) */ X X .f Xdescription X X PLUME: selects the drawing pen. If the pen number (k) is not one of X 0, 1 or 2, the function returns FALSE, else it returns TRUE. X If plume() is not called, the default pen is 0 (BLACK). X X 1 gives a gray at 0.3, 2 a light gray at 0.7. X X PLOT_PS.H includes the following _#defines: X X .nf X #define BLACK 0 X #define NOIR 0 X #define RED 1 X #define ROUGE 1 X #define GREEN 2 X #define VERT 2 X #define BLUE 2 X #define BLEU 2 X .f X X in order to indicate named colours instead of coded values. X Xauthor X X Jean-Francois VIBERT a partir de PLOT0.C de Jean-Noel Albert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X .pg X Xname PL_ROTATE Allows a rotation in degres Xindex Allows a rotation in degres X Xsynoptique X X .nf X #include X X plrotate(rot); X float rot; /* Rotation in degres */ X X .f X Xdescription X X PL_ROTATE() Allows a rotation in degres of the graph. X Xauthor X X Jean-Francois X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X .pg X Xname POLICE Allows to change the font Xindex Allows to change the font X Xsynoptique X X .nf X #include X X police(font,hy); X char *font; /* font name */ X float hy; /* Rotation in degres */ X X .f X Xdescription X X POLICE() allows to choose a new font as the current font. The first X argument is the PostScript build in font name. The size of the font X is given in centimer by hy. It can be changed alone by plsize(). X Xauthor X X Jean-Francois VIBERT X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X .pg X Xname PLSIZE Define size (in cm) of characters Xindex Define size (in cm) of characters X Xsynoptique X X .nf X #include X X plsize(hx); X float hx; /* Size of height X of characters given X in centimeters */ X .f X Xdescription X X PLSIZE() defines the size of characters, given in centimeters, X and acts on he current font choosen by police(). X Xauthor X X Jean-Francois VIBERT X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X .pg X Xname SET_GRAY Define a new default gray Xindex Define a new default gray X Xsynoptique X X .nf X #include X X set_gray(gray); X float gray; /* gray for the subsequent drawings */ X X .f X Xdescription X X SET_GRAY() defines a new gray value for the subsequent drawings. X Xauthor X X Jean-Francois VIBERT X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X .pg X Xname LINE_WIDTH Defines a new line width for the lines Xindex Defines a new line width for the lines X Xsynoptique X X .nf X #include X X line_width(width); X int width; /* PostScript width */ X X .f X Xdescription X X LINE_WIDTH() defines a new line width for the lines subsequently X drawn. The width is given in PostScript units (picas). X Xauthor X X Jean-Francois VIBERT X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X .pg X Xname CLOSED_CURVE Draws a possibly filled surface Xindex Draws a possibly filled surface X Xsynoptique X X .nf X #include X X closed_curve(x,y,nb_pts,contour,fill,gray) X float x[], /* array with x coordinates */ X x[]; /* array with y coordinates */ X int nb_pts, /* nb of values in x (and y) */ X contour,/* t or f line around or not */ X fill; /* t or f filled or not */ X float gray; /* gray filling color */ X X .f X Xdescription X X CLOSED_CURVE() draws polygonal surface whose coordinates are in 2 X arrays x and y, beginning and ending at the current position. It is X possible to decide to draw a contour around the surface. This X surface can be filled in gray, whose color is given by grey. X Xauthor X X Jean-Francois VIBERT X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X PLOT1 et PLOT2 X X X#endif X X/* X * Routines pour faciliter le portage venant de RSX X */ X#define FALSE 0 X#define TRUE 1 X X#define CR '\015' X#define LF '\012' X Xmsg(message) Xchar *message; X{ X fputs(message,stderr); X} Xfput(buffer, nbytes, iop) Xchar *buffer; Xint nbytes; XFILE *iop; X{ X fwrite(buffer,sizeof(char),nbytes,iop); X} X X/* X ROUTINES INTERNES de travail X*/ X/* X * Sort un groupe de deux valeurs au format de deplacement X */ X X/* X * TRAS est la traduction de PLOTS dans la norme PostScipt X */ Xtras(x,y,cd) Xfloat x,y; Xint cd; X{ X float xa, ya; /* Calcul de la rotation Sujet */ X float xs, ys; X register xi, yi; X X xs = x * pl_ca; ys = y * pl_sa; /* Projection sur X */ X xa = xs - ys; X xs = x * pl_sa; ys = y * pl_ca; /* Projection sur Y */ X ya = xs + ys; X X xi = (int)(xa * pl_rex); /* Mise a l'echelle */ X yi = (int)(ya * pl_rey); X X if (cd <= 1) X { X xi += pl_xs; X yi += pl_ys; X } X X p_depl(xi,yi,cd); X X} X/* X * TRAA est tout a fait semblable a TRAS,si ce n'est que le facteur X * d'echelle est pris egale au nombre de pas par centimetre ET qu'il X * n'y a pas de probleme d'origine. X */ Xtraa(x,y,cd) Xfloat x,y; Xint cd; X{ X register i_x, i_y; X X i_x = x * X_PAS; X i_y = y * X_PAS; X X p_depl(i_x,i_y,cd); X} X/* X* X* P_DEPL() genere les deplacement PostScript X*/ X/* X * Deplacement sur le traceur, en absolue ou en relatif, X * plume haute ou basse X * Cd = 0 : Absolu haut X * 1 : Absolu bas X * 2 : Relatif haut X * 3 : Relatif bas X * Si ce code est farfelu, il n'y a rien de fait. X * X * REMARQUE : Cette routine travaille a l'echelle d'un pas X * elementaire. X */ Xp_depl(i_x,i_y,cd) Xint i_x, X i_y, X cd; X{ X X if (cd < 0 || cd > 3) X return(FALSE); /* Status */ X X switch(cd) X { X case PL_AH: X if (draw) X { X fputs("gsave stroke grestore\n",pl_spl); X draw = FALSE; X } X sprintf(pl_buf,"%d %d moveto\n", X i_x,i_y); X fputs(pl_buf,pl_spl); X ex_x = i_x; X ex_y = i_y; X break; X case PL_AB: X if (!draw) X { X sprintf(pl_buf,"newpath\n%d %d moveto\n", X ex_x,ex_y); X fputs(pl_buf,pl_spl); X draw = TRUE; X } X sprintf(pl_buf,"%d %d lineto\n", X i_x,i_y); X fputs(pl_buf,pl_spl); X ex_x = i_x; X ex_y = i_y; X break; X case PL_RH: X sprintf(pl_buf,"%d %d rmoveto\n", X i_x,i_y); X fputs(pl_buf,pl_spl); X if (draw) X { X fputs("gsave stroke grestore\n",pl_spl); X draw = FALSE; X } X ex_x += i_x; X ex_y += i_y; X break; X case PL_RB: X if (!draw) X { X sprintf(pl_buf,"newpath\n%d %d moveto\n", X ex_x,ex_y); X fputs(pl_buf,pl_spl); X draw = TRUE; X } X sprintf(pl_buf,"%d %d rlineto\n", X i_x,i_y); X fputs(pl_buf,pl_spl); X ex_x += i_x; X ex_y += i_y; X break; X } X return (TRUE); X} X/* X * Sort sur le traceur une chaine de caracteres avec le DERNIER format X * defini. X */ Xp_puts(strg) Xchar *strg; X{ X register l, delt_x, delt_y; X X l = strlen(strg); /* Au pire on ajoute 3 FF */ X if (l+16 >= MAX_PLT) X { X msg ("PLOT Chaine trops longue"); X return; X } X X sprintf(pl_buf,"(%s) show\n",strg); X fputs(pl_buf,pl_spl); X X return(l); /* Pour le recalage */ X} X/*********************************************************************** X* X* Routines appelables par l'utilisateur X* X* PLOPEN -> en 1er pour ouvrir X* PLCLOSE -> en dernier pour fermer X* X* ECHEL -> Definition de l'echelle utilisateur X* PLUME -> pour choisir la plume X* PLSCAL -> pour choisir une taille de caracteres X* X*************************************************************************/ X X X/* X * PLOPEN : Permet l'initialisation du traceur X * Appelee une seule fois X * Le buffer de travail est defini dans PLOT.H X * et a une longueur fixee (mais modifiable) X */ Xplopen(nom) Xchar *nom; X{ X/* X * Ouvre le fichier resultat X */ X if ((pl_spl = fopen(nom,"w")) == NULL) X { X printf("OPENXY : Impossible d\'ouvrir %s\n",nom); X exit(1); X } X} X X/* X * PLCLOSE : Ferme le fichier X */ Xplclose() X{ X if(draw) fprintf(pl_spl,"stroke\n"); X fprintf(pl_spl,"showpage\nrestore\n"); X /* Ferme tout */ X if (fclose(pl_spl)==-1) X { X printf("PLOT : Probleme au close\n"); X } X} X/* X * ECHEL : Definition de l'Espace Sujet par rapport a l'Espace Absolu X * X * (ex ,ey) : Nombre de centimetre par U.U. (multiple de 200) X * (xs, ys) : Coordonees ABSOLUES de l'origine SUJET X * (ca, sa) : Cosinus et sinus du dessin X * retourne TRUE si l'echelle est licite, et FALSE sinon X */ Xechel(ex,ey,xs,ys,ca,sa) Xfloat ex,ey,xs,ys; Xfloat ca,sa; X{ X pl_rex = ex * X_PAS; X pl_rey = ey * X_PAS; /* Echelle en reel */ X pl_ca = ca; X pl_sa = sa; /* Rotation de l'espace Sujet */ X X pl_xs = xs * X_PAS; X pl_ys = ys * X_PAS; /* Origine Sujet */ X pl_ex = pl_rex; X pl_ey = pl_rey; /* Echelle entiere */ X X if((pl_rex - (float)pl_ex) != 0.0 || X ((pl_rey - (float)pl_ey) != 0.0 ) ) X return(FALSE); X X if (pl_ex == 0 || pl_ey == 0) X { X pl_cms = TRUE; X return(FALSE); X } X else X { X pl_cms=FALSE; X return(TRUE); X } X} X/* X * PLUME : Selectionne la plume desiree. Le systeme ne connait que X * les plumes 0, 1, 2 X */ Xplume(k) Xint k; X{ X float gris; X X if (k<0 || k>2) return(FALSE); X pl_plume=k; X X switch(k) X { X case 0: X gris = 0.; X break; X case 1: X gris = 0.3; X break; X case 2: X gris = 0.7; X } X X sprintf(pl_buf,"%3.1f setgray\n",gris); X fputs(pl_buf,pl_spl); X return(TRUE); X} X/* X * PLSIZE est une routine qui permet de definir un facteur d'echelle X * pour les differentes routines travaillant sur des caracteres. X * X * ATTENTION: hx est une hauteur exprimee en X * centimetres. X */ Xplsize(hhx) Xfloat hhx; X{ X float h_lettre; X X h_lettre = hhx * 37.5; /* 37.5 = nb de pica/cm */ X sprintf(pl_buf,"/%s findfont %d scalefont setfont\n", X pl_police,(int)h_lettre); X fputs(pl_buf,pl_spl); X hl_crte = hhx; X X} X/* X * PCARA X * X * Routine PostScipt d'ecriture d'un texte dans l'espace Absolu X * avec deplacement initial et precision d'un format. X * Ce format replace celui precedament defini. X * Il n'y a pas de recalage. X */ Xpcara(x,y,cd,strg,hx,rot) Xfloat x,y,hx; Xint cd, rot; Xchar *strg; X{ X register l; X X l=strlen(strg); /* Longueur du string */ X traa (x,y,cd); /* Deplacement */ X if (hx != hl_crte) plsize(hx); X if (rot) X { X sprintf(pl_buf,"gsave\n %d rotate\n",rot); X fputs(pl_buf,pl_spl); X } X p_puts(strg); /* Ecriture de la chaine */ X if (rot) X { X sprintf(pl_buf,"grestore\n"); X fputs(pl_buf,pl_spl); X } X} X/* X * PCARS X * X * Routine PostScipt d'ecriture d'un texte dans l'espace sujet X * avec deplacement initial et precision d'un format. X * Ce format replace celui precedament defini. X * Il n'y a pas de recalage. X */ Xpcars(x,y,cd,strg,hx,rot) Xfloat x,y,hx,rot; Xint cd; Xchar *strg; X{ X register l; X X l=strlen(strg); /* Longueur du string */ X tras(x,y,cd); /* Deplacement */ X if (hx != hl_crte) plsize(hx); X if (rot) X { X sprintf(pl_buf,"gsave\n %d rotate\n",rot); X fputs(pl_buf,pl_spl); X } X p_puts(strg); /* Ecriture de la chaine */ X if (rot) X { X sprintf(pl_buf,"grestore\n"); X fputs(pl_buf,pl_spl); X } X} X X/* X* X* POLICE() permet de choisir une police de caracteres X*/ Xpolice(txt_police,hhx) Xchar *txt_police; Xfloat hhx; /* hauteur en cm */ X{ X float h_lettre; X X strcpy(pl_police,txt_police); X h_lettre = hhx * 37.5; /* 37.5 = nb de pica/cm */ X sprintf(pl_buf,"/%s findfont %d scalefont setfont\n", X txt_police,(int)h_lettre); X fputs(pl_buf,pl_spl); X hl_crte = hhx; X} X/* X * PNUMA permet de modifier l'origine Absolue, d'effectuer un X * deplacement et de terminer un record. X * X */ Xpnuma(xf,yf,xa,ya) Xfloat xf,yf,xa,ya; X{ X traa (xf,yf,PL_AH); /* Deplacement initial */ X if (xa < (-32767/PL_PAS) || xa > (32767/PL_PAS)) X printf ("PNUMA : XA hors des limites\n"); X else X if (ya < (-32767/PL_PAS) || ya > (32767/PL_PAS)) X printf ("PNUMA : YA hors des limites\n"); X else X { X pl_x = xa * X_PAS; /* Redefinition de l'adresse de */ X pl_y = ya * X_PAS; /* la plume */ X } X sprintf(pl_buf,"%d %d translate\n",ex_x,ex_y); X fputs(pl_buf,pl_spl); X} X/* X* LINE_WIDTH() permet de choisir une epaisseur de trait X*/ Xline_width(largeur) Xint largeur; X{ X sprintf(pl_buf,"%d setlinewidth\n",largeur); X fputs(pl_buf,pl_spl); X} X/* X* CLOSED_CURVE() demarre un panneau avec un pattern gris X*/ Xclosed_curve(x_pts,y_pts,nb_pts,contour,rempli,gris) Xfloat x_pts[], X y_pts[], X gris; Xint nb_pts, X rempli, X contour; X{ X int i; X X if (draw) X { X fputs("gsave stroke grestore\n",pl_spl); X draw = FALSE; X } X sprintf(pl_buf,"%d %d moveto\n",ex_x,ex_y); X fputs(pl_buf,pl_spl); X X for (i = 0; i < nb_pts; i++) X { X if (pl_cms) traa(x_pts[i],y_pts[i],PL_AB); X else tras(x_pts[i],y_pts[i],PL_AB); X } X X sprintf(pl_buf,"closepath\n"); X fputs(pl_buf,pl_spl); X X draw = FALSE; X X X if (contour) X { X sprintf(pl_buf,"gsave\nstroke\ngrestore\n"); X fputs(pl_buf,pl_spl); X } X if (rempli) X { X sprintf(pl_buf,"gsave %f setgray fill grestore\n",gris); X fputs(pl_buf,pl_spl); X } X /* reactualisation de ex_x t ex_y */ X X if (pl_cms) traa(x_pts[0],y_pts[0],PL_AH); X else tras(x_pts[0],y_pts[0],PL_AH); X X} X/* X* SET_GRAY() permet de definir le niveau de gris X*/ Xset_gray(gris) Xfloat gris; /* entre 0 et 1 */ X{ X if (gris < 0.) gris = 0.; /* 0 --> NOIR */ X if (gris > 1.) gris = 1.; /* 1 --> BLANC */ X X sprintf(pl_buf,"%f setgray\n",gris); X fputs(pl_buf,pl_spl); X} X/* X* PL_ROTATE() permet de definir une rotation X*/ Xpl_rotate(angle) Xint angle; X{ X sprintf(pl_buf,"%d rotate\n",angle); X fputs(pl_buf,pl_spl); X} *-*-END_of_plot0_ps.c-*-* echo x - plot2_ps.c sed 's/^X//' >plot2_ps.c <<'*-*-END_of_plot2_ps.c-*-*' X/* X P L O T 2 _ P S X ====================== X X Routines de dessin sur la LN03R PostScript. X X NIVEAU 1 : Ce jeu de routine regroupe d'autres routines du X logiciel plot_ps, de niveau plus eleve X*/ X/**************************************************************** X* X* Routines de mouvement de la plume X* X* b -> espace benson (en cm) X* s -> espace utilisateur c-a-d sujet (a l'echelle) X* a -> mouvement en absolu X* r -> mouvement en relatif X* X* xxxxba -> espace benson en absolu X* xxxxsa -> espace utilisateur en absolu X* xxxxbr -> espace benson en relatif X* xxxxsr -> espace utilisateur en relatif X* X* P pour plume X* MOV pour deplacement plume haute (sans trace) X* LIN pour deplacement plume basse (trace de trait) X* X********************************************************************/ X X#ifdef DOCUMENTATION X Xtitle PLOT2_PS Jeu de fonctions de mouvements de plume Xindex Jeu de fonctions de mouvements de plume X X Xsynoptique X X .nf X #include X X puser() X X pcms() X X pmover(x,y) X float x, y; X X pmovea(x,y) X float x, y; X X pdrawr(x,y) X float x, y; X X pdrawa(x,y) X float x, y; X X phome() X X Les fonctions suivantes ne devraient jamais etre appelees. X X pmover(x,y) X float x, y; X X pmovea(x,y) X float x, y; X X plinsa(x,y) X float x, y; X X plinba(x,y) X float x, y; X X plinsr(x,y) X float x, y; X X plinbr(x,y) X float x, y; X Xdescription X X puser() permet de passer en mode espace sujet, tous les ordres de X mouvement de plume seront consideres comme ayant des coordonnees x X et y en unites sujet (pas en cms!). X X pcms() permet de passer en mode espace papier, tous les ordres de X mouvement de plume seront consideres comme ayant des coordonnees x X et y en cms sur le papier. X X Les functions suivantes permetettent de dessiner dans l'espace X courant: pmove deplace sans dessiner, draw deplace en dessinant, et X les coordonnees sont prises en absolu (suffixe a) ou relative X (suffixe r). X X pmovea(x,y) se deplace au point x,y en absolu X X pmover(x,y) se deplace au point x,y en relatif X X pdrawa(x,y) trace un trait jusqu'au point x,y en absolu X X pdrawr(x,y) trace un trait jusqu'au point x,y en relatif X X phome() retourne au point absolu 0,0 X X Les fonctions suivantes ne devraient jamais etre appelees: X Elles permettent eventuellement de faire un deplacement dans un X autre espace que l'espace courant. X X Routines de mouvement de la plume X X b -> espace papier (en cm) X s -> espace utilisateur c-a-d sujet (a l'echelle) X a -> mouvement en absolu X r -> mouvement en relatif X X xxxxba -> espace papier en absolu X xxxxsa -> espace utilisateur en absolu X xxxxbr -> espace benson en relatif X xxxxsr -> espace utilisateur en relatif X X P pour plume X MOV pour deplacement plume haute (sans trace) X LIN pour deplacement plume basse (trace de trait) X X X pmovsa(x,y) se deplace au point x,y en absolu dans l'espace sujet X X pmovba(x,y) se deplace au point x,y en absolu dans l'espace papier X X pmovsr(x,y) se deplace au point x,y en relatif dans l'espace sujet X X pmovbr(x,y) se deplace au point x,y en relatif dans l'espace papier X X plinsa(x,y) trace jusqu'au point x,y en absolu dans l'espace sujet X X plinba(x,y) trace jusqu'au point x,y en absolu dans l'espace papier X X plinsr(x,y) trace jusqu'au point x,y en relatif dans l'espace sujet X X plinbr(x,y) trace jusqu'au point x,y en relatif dans l'espace papier X Xauthor X X Dr Jean-Francois Vibert X X CHU Saint-Antoine CNRS UA1162 Universite Paris VI X XSee also X X plot0_ps, iniplot_ps, endplot_ps, newpage_ps X X#endif X X#include X#include "extplot_ps.h" X#define TRUE 1 X#define FALSE 0 X X/* X* X* PMOVBA(x,y) X* X* va au point nomme plume haute en absolu X* X*/ Xpmovba(x,y) Xfloat x, y; X{ X traa(x,y,PL_AH); X} X/* X* X* PMOVSA(x,y) X* X* va au point nomme plume haute en absolu X* espace sujet a l'echelle (non en cm) X* X*/ Xpmovsa(x,y) Xfloat x, y; X{ X tras(x,y,PL_AH); X} X/* X* X* PMOVBR(x,y) X* X* va au point nomme plume haute en relatif X* espace benson (en cm) X* X*/ Xpmovbr(x,y) Xfloat x, y; X{ X traa(x,y,PL_RH); X} X/* X* X* PMOVSR(x,y) X* X* va au point nomme plume haute en relatif X* espace sujet a l'echelle (non en cm) X* X*/ Xpmovsr(x,y) Xfloat x, y; X{ X tras(x,y,PL_RH); X} X/* X* X* PLINBA(x,y) X* X* va au point nomme plume haute en absolu X* X*/ Xplinba(x,y) Xfloat x, y; X{ X traa(x,y,PL_AB); X} X/* X* X* PLINSA(x,y) X* X* va au point nomme plume haute en absolu X* espace sujet a l'echelle (non en cm) X* X*/ Xplinsa(x,y) Xfloat x, y; X{ X tras(x,y,PL_AB); X} X/* X* X* PLINBR(x,y) X* X* va au point nomme plume haute en relatif X* espace benson (en cm) X* X*/ Xplinbr(x,y) Xfloat x, y; X{ X traa(x,y,PL_RB); X} X/* X* X* PLINSR(x,y) X* X* va au point nomme plume haute en relatif X* espace sujet a l'echelle (non en cm) X* X*/ Xplinsr(x,y) Xfloat x, y; X{ X tras(x,y,PL_RB); X} X/* X* X* PBENSON() ou PCMS() switch le travail en espace Benson ou Laser (en cm) X* X*/ Xpcms() X{ X pl_cms = TRUE; X} Xpbenson() X{ X pl_cms = TRUE; X} X/* X* X* PUSER() switch le travail en espace utilisateur (NON en cm) X* X*/ Xpuser() X{ X pl_cms = FALSE; X} X/* X* X* PDRAWA(x,y) trace une ligne (x et y en absolu) X* tient compte de l'espace de travail X*/ Xpdrawa(x,y) Xfloat x, y; X{ X if (pl_cms) traa(x,y,PL_AB); X else tras(x,y,PL_AB); X} X/* X* X* PDRAWR(x,y) trace une ligne (x et y en relatif) X* tient compte de l'espace de travail X*/ Xpdrawr(x,y) Xfloat x, y; X{ X if (pl_cms) traa(x,y,PL_RB); X else tras(x,y,PL_RB); X} X/* X* X* PMOVEA(x,y) deplace la plume (x et y en absolu) X* tient compte de l'espace de travail X*/ Xpmovea(x,y) Xfloat x, y; X{ X if (pl_cms) traa(x,y,PL_AH); X else tras(x,y,PL_AH); X} X/* X* X* PMOVER(x,y) deplace la plume (x et y en relatif) X* tient compte de l'espace de travail X*/ Xpmover(x,y) Xfloat x, y; X{ X if (pl_cms) traa(x,y,PL_RH); X else tras(x,y,PL_RH); X} X/* X* X* PHOME(x,y) deplace la plume a l'origine (0.,0.) X* tient compte de l'espace de travail X*/ Xphome() X{ X if (pl_cms) traa(0.,0.,PL_AH); X else tras(0.,0.,PL_AH); X} *-*-END_of_plot2_ps.c-*-* exit