1 |
< |
/* Copyright (c) 1987 Regents of the University of California */ |
2 |
< |
|
3 |
< |
/* SCCSid "$SunId$ LBL" */ |
4 |
< |
|
1 |
> |
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
* rpaint.h - header file for image painting. |
7 |
– |
* |
8 |
– |
* 1/30/87 |
4 |
|
*/ |
5 |
+ |
#ifndef _RAD_RPAINT_H_ |
6 |
+ |
#define _RAD_RPAINT_H_ |
7 |
|
|
8 |
|
#include "driver.h" |
12 |
– |
|
9 |
|
#include "view.h" |
10 |
|
|
11 |
+ |
#ifdef __cplusplus |
12 |
+ |
extern "C" { |
13 |
+ |
#endif |
14 |
+ |
|
15 |
+ |
#if defined(_WIN32) || defined(_WIN64) |
16 |
+ |
/* stupid Windows name collisions */ |
17 |
+ |
#undef COORD |
18 |
+ |
#define COORD radCOORD |
19 |
+ |
#undef RECT |
20 |
+ |
#define RECT radRECT |
21 |
+ |
#endif |
22 |
+ |
|
23 |
|
typedef short COORD; /* an image coordinate */ |
24 |
|
|
25 |
|
typedef struct pnode { |
26 |
|
struct pnode *kid; /* children */ |
27 |
|
COORD x, y; /* position */ |
28 |
+ |
COORD xmin, ymin, xmax, ymax; /* rectangle */ |
29 |
|
COLOR v; /* value */ |
30 |
|
} PNODE; /* a paint node */ |
31 |
|
|
45 |
|
|
46 |
|
extern VIEW ourview; /* current view parameters */ |
47 |
|
extern VIEW oldview; /* previous view parameters */ |
48 |
+ |
extern int hresolu, vresolu; /* image resolution */ |
49 |
|
|
50 |
+ |
extern int newparam; /* parameter setting changed */ |
51 |
+ |
|
52 |
+ |
extern char *dvcname; /* output device name */ |
53 |
+ |
|
54 |
+ |
extern char rifname[]; /* rad input file name */ |
55 |
+ |
|
56 |
+ |
extern int psample; /* pixel sample size */ |
57 |
+ |
extern double maxdiff; /* max. sample difference */ |
58 |
+ |
|
59 |
|
extern int greyscale; /* map colors to brightness? */ |
60 |
|
|
61 |
|
extern int pdepth; /* image depth in current frame */ |
65 |
|
|
66 |
|
extern struct driver *dev; /* driver functions */ |
67 |
|
|
68 |
< |
extern PNODE *findrect(); |
68 |
> |
extern int nproc; /* number of processes */ |
69 |
> |
|
70 |
> |
/* defined in rview.c */ |
71 |
> |
extern void devopen(char *dname); |
72 |
> |
extern void devclose(void); |
73 |
> |
extern void printdevices(void); |
74 |
> |
extern void command(char *prompt); |
75 |
> |
extern void rsample(void); |
76 |
> |
extern int refine(PNODE *p, int pd); |
77 |
> |
/* defined in rv2.c */ |
78 |
> |
extern void getframe(char *s); |
79 |
> |
extern void getrepaint(char *s); |
80 |
> |
extern void getview(char *s); |
81 |
> |
extern void lastview(char *s); |
82 |
> |
extern void saveview(char *s); |
83 |
> |
extern void loadview(char *s); |
84 |
> |
extern void getfocus(char *s); |
85 |
> |
extern void getaim(char *s); |
86 |
> |
extern void getmove(char *s); |
87 |
> |
extern void getrotate(char *s); |
88 |
> |
extern void getpivot(char *s); |
89 |
> |
extern void getorigin(char *s); |
90 |
> |
extern void getexposure(char *s); |
91 |
> |
extern int getparam(char *str, char *dsc, int typ, void *p); |
92 |
> |
extern void setparam(char *s); |
93 |
> |
extern void traceray(char *s); |
94 |
> |
extern void writepict(char *s); |
95 |
> |
/* defined in rv3.c */ |
96 |
> |
extern int getrect(char *s, RECT *r); |
97 |
> |
extern int getinterest(char *s, int direc, FVECT vec, double *mp); |
98 |
> |
extern float *greyof(COLOR col); |
99 |
> |
extern int paint(PNODE *p); |
100 |
> |
extern int waitrays(void); |
101 |
> |
extern void newimage(char *s); |
102 |
> |
extern void redraw(void); |
103 |
> |
extern void repaint(int xmin, int ymin, int xmax, int ymax); |
104 |
> |
extern void paintrect(PNODE *p, RECT *r); |
105 |
> |
extern PNODE *findrect(int x, int y, PNODE *p, int pd); |
106 |
> |
extern void compavg(PNODE *p); |
107 |
> |
extern void scalepict(PNODE *p, double sf); |
108 |
> |
extern void getpictcolrs(int yoff, COLR *scan, PNODE *p, |
109 |
> |
int xsiz, int ysiz); |
110 |
> |
extern void freepkids(PNODE *p); |
111 |
> |
extern void newview(VIEW *vp); |
112 |
> |
extern void moveview(double angle, double elev, double mag, FVECT vc); |
113 |
> |
extern void pcopy(PNODE *p1, PNODE *p2); |
114 |
> |
extern void zoomview(VIEW *vp, double zf); |
115 |
> |
|
116 |
> |
|
117 |
> |
#ifdef __cplusplus |
118 |
> |
} |
119 |
> |
#endif |
120 |
> |
#endif /* _RAD_RPAINT_H_ */ |
121 |
> |
|