Mapper
libraries
common
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;
20
float
xrat
,
yrat
,
mult
,
dmult
,
cmult
;
21
long
nx
[4],
ny
[4];
22
Dimension
width
,
height
;
23
Arg
args
[10];
24
unsigned
long
XSIZE
,
YSIZE
;
25
XPoint
point
[5];
26
long
xmin
,
xmax
,
ymin
,
ymax
,
lint1
,
lint2
;
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
}
qmap
unsigned long qmap[16]
Definition:
mapper.c:116
zmap
unsigned long zmap[16]
Definition:
mapper.c:116
xrat
float xrat
Definition:
plot_qpf_legend.c:20
xmax
long xmax
Definition:
plot_qpf_legend.c:26
dj
int dj[4]
Definition:
plot_qpf_legend.c:28
color
int color
Definition:
plot_qpf_legend.c:19
value
float value
Definition:
plot_qpf_legend.c:29
yrat
float yrat
Definition:
plot_qpf_legend.c:20
info_font
XFontStruct * info_font[10]
Definition:
mapper.c:195
ny
long ny[4]
Definition:
plot_qpf_legend.c:21
ymax
long ymax
Definition:
plot_qpf_legend.c:26
mult
float mult
Definition:
plot_qpf_legend.c:20
j
int j
Definition:
plot_qpf_legend.c:18
pcp
struct pcp * pcp
Definition:
mapper.c:140
fbuf
char fbuf[100]
Definition:
plot_qpf_legend.c:17
dy
int dy
Definition:
plot_qpf_legend.c:28
pcp_in_use
int pcp_in_use[50]
Definition:
mapper.c:78
lint1
long lint1
Definition:
plot_qpf_legend.c:26
gc
GC gc
Definition:
mapper.c:163
dx
int dx
Definition:
plot_qpf_legend.c:28
hrap_grid
struct hrap_grid * hrap_grid
Definition:
mapper.c:142
cmult
float cmult
Definition:
plot_qpf_legend.c:20
xmap
unsigned long xmap[16]
Definition:
mapper.c:116
xcen
signed long xcen
Definition:
plot_qpf_legend.c:27
pts
int pts
Definition:
plot_qpf_legend.c:28
display
Display * display
Definition:
mapper.c:159
font
Font font[10]
Definition:
mapper.c:161
height
Dimension height
Definition:
plot_qpf_legend.c:22
ycen
signed long ycen
Definition:
plot_qpf_legend.c:27
width
Dimension width
Definition:
plot_qpf_legend.c:22
yheight
int yheight
Definition:
plot_qpf_legend.c:28
lint2
long lint2
Definition:
plot_qpf_legend.c:26
args
Arg args[10]
Definition:
plot_qpf_legend.c:23
xmin
long xmin
Definition:
plot_qpf_legend.c:26
XSIZE
unsigned long XSIZE
Definition:
plot_qpf_legend.c:24
k
int k
Definition:
plot_qpf_legend.c:18
MY
int MY
Definition:
plot_qpf_legend.c:19
zoom
int zoom
Definition:
plot_qpf_legend.c:9
delim
float delim[][16]
Definition:
mapper.c:30
nx
long nx[4]
Definition:
plot_qpf_legend.c:21
dmult
float dmult
Definition:
plot_qpf_legend.c:20
drawing_area
Widget drawing_area
Definition:
mapper.c:185
i
int i
Definition:
plot_qpf_legend.c:18
npoint
int npoint[2]
Definition:
mapper.c:105
ymin
long ymin
Definition:
plot_qpf_legend.c:26
YSIZE
unsigned long YSIZE
Definition:
plot_qpf_legend.c:24
kscale
int kscale
Definition:
mapper.c:101
di
int di[4]
Definition:
plot_qpf_legend.c:28
display_set
Definition:
misc.h:603
hrap_grid
Definition:
misc.h:578
pcp
Definition:
misc.h:596
point
Definition:
mapp2h.h:29
Generated by
1.9.1