Doxygen Source Code Documentation
        
Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search   
pwrit.c
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 #include "f2c.h"
00007 
00008 
00009 
00010 extern struct {
00011     real xpgmin, ypgmin, xpgmax, ypgmax, xclbot, yclbot, xcltop, ycltop, xbot,
00012              ybot, xtop, ytop, xmin, ymin, xmax, ymax;
00013     integer ixcoor, iycoor;
00014     real alphxx, betaxx, alphyy, betayy, tmajx, tminx, tmajy, tminy;
00015     integer majrx, minrx, majry, minry, isizx, isizy;
00016     real xphold, yphold;
00017 } zzzplt_;
00018 
00019 #define zzzplt_1 zzzplt_
00020 
00021 extern struct {
00022     real xphmax, yphmax;
00023     integer ixpmax, iypmax;
00024     real xpscal, ypscal;
00025     integer iflip, nplotr;
00026     char cfile[64];
00027 } zzpltr_;
00028 
00029 #define zzpltr_1 zzpltr_
00030 
00031 
00032 
00033 
00034  int pwrit_(real *x, real *y, char *ch, integer *nch, integer 
00035         *isiz, integer *ior, integer *icent, ftnlen ch_len)
00036 {
00037     
00038     integer i__1;
00039 
00040     
00041     static integer i__, nchar;
00042     static real width;
00043     static integer isize;
00044     static real ct, dx, dy, oor, st, xx, yy;
00045     extern  int zzchar_(char *, real *, real *, real *, real *
00046             , ftnlen), zzphys_(real *, real *);
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069     
00070     --ch;
00071 
00072     
00073     isize = *isiz;
00074     if (isize <= 0) {
00075         isize = 8;
00076     } else if (isize == 1) {
00077         isize = 12;
00078     } else if (isize == 2) {
00079         isize = 16;
00080     } else if (isize == 3) {
00081         isize = 24;
00082     }
00083 
00084     width = isize * .001f * (zzzplt_1.xpgmax - zzzplt_1.xpgmin);
00085 
00086 
00087 
00088 
00089     oor = *ior * .017453292f;
00090     dx = width * cos(oor);
00091     dy = width * sin(oor);
00092     ct = dx * .1666667f;
00093     st = dy * .1666667f;
00094 
00095 
00096 
00097     xx = *x;
00098     yy = *y;
00099     if (*nch > 0) {
00100         zzphys_(&xx, &yy);
00101     }
00102 
00103 
00104 
00105 
00106     nchar = abs(*nch);
00107     if (nchar == 999) {
00108         i__1 = nchar;
00109         for (i__ = 1; i__ <= i__1; ++i__) {
00110             if (*(unsigned char *)&ch[i__] == '\0') {
00111                 goto L20;
00112             }
00113 
00114         }
00115 L20:
00116         nchar = i__ - 1;
00117     }
00118 
00119 
00120 
00121 
00122     if (*icent != -2) {
00123 
00124 
00125         xx += dy * .5833333f;
00126         yy -= dx * .5833333f;
00127         if (*icent == 0) {
00128             xx -= nchar * .5f * dx;
00129             yy -= nchar * .5f * dy;
00130         } else if (*icent == 1) {
00131             xx -= nchar * dx;
00132             yy -= nchar * dy;
00133         }
00134     }
00135 
00136 
00137     i__1 = nchar;
00138     for (i__ = 1; i__ <= i__1; ++i__) {
00139         zzchar_(ch + i__, &xx, &yy, &ct, &st, 1L);
00140         xx += dx;
00141         yy += dy;
00142 
00143     }
00144 
00145 
00146     zzzplt_1.xphold = xx;
00147     zzzplt_1.yphold = yy;
00148     return 0;
00149 } 
00150