Mapper
plot_qpf_legend.c
Go to the documentation of this file.
1 
2 
3 
4 extern struct pcp *pcp;
5 extern int pcp_in_use[50];
6 extern Font font[10];
7 extern XFontStruct *info_font[10];
8 extern Display *display;
9 extern int npoint[2],zoom;
10 extern int kscale;
11 extern GC gc;
12 extern unsigned long xmap[16];
13 extern Widget drawing_area;
14 extern float delim[][16];
15 extern struct display_set display_set[4];
16 extern struct hrap_grid *hrap_grid;
17 char fbuf[100];
18 int i,j,k;
19 int color,MY=10;
21 long nx[4],ny[4];
22 Dimension width,height;
23 Arg args[10];
24 unsigned long XSIZE,YSIZE;
25 XPoint point[5];
27 signed long xcen,ycen;
28 int di[4],dj[4],dy,dx,pts,yheight;
29 float value;
30 
31 
32 
33 for(i=0;i<8;i++) {
34 
35  if(qpf_gridded_flag[i] < 0)
36  continue;
37 
38  if(i < 4)
39  strcpy(fbuf,"Day 1");
40  else
41  strcpy(fbuf,"Day 2");
42 
43  itim=i-(i/4*4);
44 
45  if(itim==0)
46  strcat(fbuf," 12Z-18Z");
47  else if(itim==1)
48  strcat(fbuf," 18Z-00Z");
49  else if(itim==2)
50  strcat(fbuf," 00Z-06Z");
51  else if(itim==3)
52  strcat(fbuf," 06Z-12Z");
53 
54  if(bogus_flag[i]==0)
55  strcat(fbuf," No Precipitation ");
56 
57  else if(bogus_flag[i]==-1)
58  strcat(fbuf," No Forecast ");
59 
60  XSetForeground(display,gc,zmap[i]);
61  XDrawLine(display,pixm,gc,15,ymax/10-(10-i)*yheight-yheight/2,35,
62  ymax/10-(10-i)*yheight-yheight/2);
63  XSetForeground(display,gc,qmap[15]);
64  XDrawString(display,pixm,gc,35,ymax/10-(10-i)*yheight,
65  fbuf,strlen(fbuf));
66 
67  }
unsigned long qmap[16]
Definition: mapper.c:116
unsigned long zmap[16]
Definition: mapper.c:116
float xrat
long xmax
int dj[4]
int color
float value
float yrat
XFontStruct * info_font[10]
Definition: mapper.c:195
long ny[4]
long ymax
float mult
int j
struct pcp * pcp
Definition: mapper.c:140
char fbuf[100]
int dy
int pcp_in_use[50]
Definition: mapper.c:78
long lint1
GC gc
Definition: mapper.c:163
int dx
struct hrap_grid * hrap_grid
Definition: mapper.c:142
float cmult
unsigned long xmap[16]
Definition: mapper.c:116
signed long xcen
int pts
Display * display
Definition: mapper.c:159
Font font[10]
Definition: mapper.c:161
Dimension height
signed long ycen
Dimension width
int yheight
long lint2
Arg args[10]
long xmin
unsigned long XSIZE
int k
int MY
int zoom
float delim[][16]
Definition: mapper.c:30
long nx[4]
float dmult
Widget drawing_area
Definition: mapper.c:185
int i
int npoint[2]
Definition: mapper.c:105
long ymin
unsigned long YSIZE
int kscale
Definition: mapper.c:101
int di[4]
Definition: misc.h:596
Definition: mapp2h.h:29