GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
defs/display.h
Go to the documentation of this file.
1 #ifndef GRASS_DISPLAYDEFS_H
2 #define GRASS_DISPLAYDEFS_H
3 
4 /* cnversions.c */
5 void D_update_conversions(void);
6 void D_fit_d_to_u(void);
7 void D_fit_u_to_d(void);
8 void D_show_conversions(void);
9 
10 void D_do_conversions(const struct Cell_head *, double, double, double, double);
11 
12 int D_is_lat_lon(void);
13 
14 double D_get_d_to_a_xconv(void);
15 double D_get_d_to_a_yconv(void);
16 double D_get_d_to_u_xconv(void);
17 double D_get_d_to_u_yconv(void);
18 double D_get_a_to_u_xconv(void);
19 double D_get_a_to_u_yconv(void);
20 double D_get_a_to_d_xconv(void);
21 double D_get_a_to_d_yconv(void);
22 double D_get_u_to_d_xconv(void);
23 double D_get_u_to_d_yconv(void);
24 double D_get_u_to_a_xconv(void);
25 double D_get_u_to_a_yconv(void);
26 
27 double D_get_ns_resolution(void);
28 double D_get_ew_resolution(void);
29 
30 double D_get_u_west(void);
31 double D_get_u_east(void);
32 double D_get_u_north(void);
33 double D_get_u_south(void);
34 double D_get_a_west(void);
35 double D_get_a_east(void);
36 double D_get_a_north(void);
37 double D_get_a_south(void);
38 double D_get_d_west(void);
39 double D_get_d_east(void);
40 double D_get_d_north(void);
41 double D_get_d_south(void);
42 
43 void D_set_region(const struct Cell_head *);
44 void D_set_src(double, double, double, double);
45 void D_get_src(double *, double *, double *, double *);
46 void D_set_grid(int, int, int, int);
47 void D_get_grid(int *, int *, int *, int *);
48 void D_set_dst(double, double, double, double);
49 void D_get_dst(double *, double *, double *, double *);
50 
51 void D_get_u(double [2][2]);
52 void D_get_a(int [2][2]);
53 void D_get_d(double [2][2]);
54 
55 double D_d_to_a_row(double);
56 double D_d_to_a_col(double);
57 double D_d_to_u_row(double);
58 double D_d_to_u_col(double);
59 double D_a_to_u_row(double);
60 double D_a_to_u_col(double);
61 double D_a_to_d_row(double);
62 double D_a_to_d_col(double);
63 double D_u_to_d_row(double);
64 double D_u_to_d_col(double);
65 double D_u_to_a_row(double);
66 double D_u_to_a_col(double);
67 
68 /* draw2.c */
69 
70 void D_set_clip(double, double, double, double);
71 void D_clip_to_map(void);
72 void D_set_clip_mode(int);
73 void D_set_reduction(double);
74 
75 void D_line_width(double);
76 void D_get_text_box(const char *, double *, double *, double *, double *);
77 
78 void D_pos_abs(double, double);
79 void D_pos_rel(double, double);
80 void D_move_abs(double, double);
81 void D_move_rel(double, double);
82 void D_cont_abs(double, double);
83 void D_cont_rel(double, double);
84 void D_line_abs(double, double, double, double);
85 void D_line_rel(double, double, double, double);
86 void D_polydots_abs(const double *, const double *, int);
87 void D_polydots_rel(const double *, const double *, int);
88 void D_polyline_abs(const double *, const double *, int);
89 void D_polyline_rel(const double *, const double *, int);
90 void D_polygon_abs(const double *, const double *, int);
91 void D_polygon_rel(const double *, const double *, int);
92 void D_box_abs(double, double, double, double);
93 void D_box_rel(double, double);
94 
95 void D_begin(void);
96 void D_end(void);
97 void D_close(void);
98 void D_stroke(void);
99 void D_fill(void);
100 void D_dots(void);
101 
102 /* icon.c */
103 void D_plot_icon(double, double, int, double, double);
104 
105 /* raster.c */
106 int D_draw_raster(int, const void *, struct Colors *, RASTER_MAP_TYPE);
107 int D_draw_d_raster(int, const DCELL *, struct Colors *);
108 int D_draw_f_raster(int, const FCELL *, struct Colors *);
109 int D_draw_c_raster(int, const CELL *, struct Colors *);
110 void D_raster_draw_begin(void);
111 int D_draw_raster_RGB(int, const void *, const void *, const void *,
112  struct Colors *, struct Colors *, struct Colors *,
114 void D_raster_draw_end(void);
115 
116 /* raster2.c */
117 int D_set_overlay_mode(int);
118 int D_color(CELL, struct Colors *);
119 int D_c_color(CELL, struct Colors *);
120 int D_d_color(DCELL, struct Colors *);
121 int D_f_color(FCELL, struct Colors *);
122 int D_color_of_type(const void *, struct Colors *, RASTER_MAP_TYPE);
123 
124 /* setup.c */
125 void D_setup(int);
126 void D_setup_unity(int);
127 void D_setup2(int, int, double, double, double, double);
128 
129 /* symbol.c */
130 void D_symbol(const SYMBOL *, double, double, const RGBA_Color *,
131  const RGBA_Color *);
132 void D_symbol2(const SYMBOL *, double, double, const RGBA_Color *,
133  const RGBA_Color *);
134 
135 /* tran_colr.c */
136 int D_translate_color(const char *);
137 int D_parse_color(const char *, int);
138 int D_use_color(int);
139 int D_color_number_to_RGB(int, int *, int *, int *);
140 void D_RGB_color(int, int, int);
141 
142 /* window.c */
143 void D_erase(const char *);
144 
145 /* r_raster.c */
146 
147 int D_open_driver(void);
148 void D_close_driver(void);
149 int D_save_command(const char *);
150 
151 void D__erase(void);
152 
153 void D_text_size(double, double);
154 void D_text_rotation(double);
155 void D_text(const char *);
156 
157 void D_font(const char *);
158 void D_encoding(const char *);
159 void D_font_list(char ***, int *);
160 void D_font_info(char ***, int *);
161 
162 void D_get_clip_window(double *, double *, double *, double *);
163 void D_set_clip_window(double, double, double, double);
164 void D_get_frame(double *, double *, double *, double *);
165 void D_get_screen(double *, double *, double *, double *);
168 
169 const char *D_get_file(void);
170 
171 #endif /* GRASS_DISPLAYDEFS_H */
double D_get_u_west(void)
Definition: cnversions.c:183
void D_encoding(const char *)
Set encoding.
Definition: r_raster.c:243
void D_font_info(char ***, int *)
Get font info.
Definition: r_raster.c:265
double D_d_to_a_col(double)
screen to array (x)
Definition: cnversions.c:332
void D_text(const char *)
Draw text.
Definition: r_raster.c:221
void D_set_clip(double, double, double, double)
set clipping window
Definition: draw2.c:152
double D_get_d_to_a_xconv(void)
Definition: cnversions.c:167
double D_get_a_to_u_yconv(void)
Definition: cnversions.c:172
double D_d_to_u_row(double)
screen to earth (y)
Definition: cnversions.c:348
int D_color_number_to_RGB(int, int *, int *, int *)
get RGB values from color number
Definition: tran_colr.c:180
double D_get_a_east(void)
Definition: cnversions.c:189
double D_get_d_south(void)
Definition: cnversions.c:196
void D_begin(void)
Definition: draw2.c:291
void D_close_driver(void)
Close display driver.
Definition: r_raster.c:164
void D_fit_u_to_d(void)
Definition: cnversions.c:105
void D_fit_d_to_u(void)
Definition: cnversions.c:100
void D_clip_to_map(void)
set clipping window to map window
Definition: draw2.c:171
int D_draw_c_raster(int, const CELL *, struct Colors *)
Draw raster row (CELL)
double D_get_d_to_u_xconv(void)
Definition: cnversions.c:169
void D_move_rel(double, double)
Definition: draw2.c:439
int D_use_color(int)
draw with a color from D_parse_color
Definition: tran_colr.c:143
2D/3D raster map header (used also for region)
Definition: gis.h:412
double D_a_to_d_col(double)
array to screen (column)
Definition: cnversions.c:430
void D_polyline_rel(const double *, const double *, int)
Definition: draw2.c:455
double DCELL
Definition: gis.h:603
void D_get_grid(int *, int *, int *, int *)
Definition: cnversions.c:243
double D_u_to_a_col(double)
earth to array (east
Definition: cnversions.c:494
void D_set_grid(int, int, int, int)
Definition: cnversions.c:234
void D_get_screen(double *, double *, double *, double *)
get screen bounds
Definition: r_raster.c:342
void D_line_rel(double, double, double, double)
Definition: draw2.c:468
int D_f_color(FCELL, struct Colors *)
Same functionality as D_color() except that the value is type FCELL. This implies that the floating-p...
Definition: raster2.c:112
void D_pos_rel(double, double)
Definition: draw2.c:229
int D_draw_f_raster(int, const FCELL *, struct Colors *)
Draw raster row (FCELL)
Definition: symbol.h:67
double D_d_to_a_row(double)
screen to array (y)
Definition: cnversions.c:316
double D_get_u_south(void)
Definition: cnversions.c:186
void D_stroke(void)
Definition: draw2.c:323
double D_u_to_a_row(double)
earth to array (north)
Definition: cnversions.c:478
const char * D_get_file(void)
Get driver output file.
double D_get_d_east(void)
Definition: cnversions.c:194
void D_setup(int)
Graphics frame setup.
Definition: display/setup.c:46
void D_get_frame(double *, double *, double *, double *)
get graphical window (frame)
Definition: r_raster.c:322
double D_get_u_to_d_yconv(void)
Definition: cnversions.c:176
void D_close(void)
Definition: draw2.c:318
double D_get_a_south(void)
Definition: cnversions.c:191
double D_get_a_to_d_yconv(void)
Definition: cnversions.c:174
void D_font_list(char ***, int *)
Get font list.
Definition: r_raster.c:254
void D_set_clip_window(double, double, double, double)
set graphical clipping window
Definition: r_raster.c:300
double D_a_to_u_row(double)
array to earth (row)
Definition: cnversions.c:380
int D_draw_raster_RGB(int, const void *, const void *, const void *, struct Colors *, struct Colors *, struct Colors *, RASTER_MAP_TYPE, RASTER_MAP_TYPE, RASTER_MAP_TYPE)
Draw raster row in RGB mode.
void D_update_conversions(void)
Definition: cnversions.c:93
void D_set_clip_window_to_screen_window(void)
set clipping window to screen window
Definition: r_raster.c:377
void D_cont_rel(double, double)
Definition: draw2.c:444
double D_get_a_north(void)
Definition: cnversions.c:190
void D_get_clip_window(double *, double *, double *, double *)
get graphical clipping window
Definition: r_raster.c:282
void D_line_width(double)
Definition: draw2.c:189
int D_color(CELL, struct Colors *)
Definition: raster2.c:68
int D_translate_color(const char *)
color name to number
Definition: tran_colr.c:126
int D_draw_d_raster(int, const DCELL *, struct Colors *)
Draw raster row (DCELL)
void D_setup_unity(int)
Graphics frame setup.
Definition: display/setup.c:78
void D_raster_draw_begin(void)
Prepare for raster graphic.
double D_get_u_east(void)
Definition: cnversions.c:184
double D_get_d_to_u_yconv(void)
Definition: cnversions.c:170
void D_line_abs(double, double, double, double)
Definition: draw2.c:399
double D_get_ew_resolution(void)
Definition: cnversions.c:181
double D_get_a_to_u_xconv(void)
Definition: cnversions.c:171
void D_raster_draw_end(void)
Finish raster rendering.
double D_get_d_to_a_yconv(void)
Definition: cnversions.c:168
void D_font(const char *)
Choose font.
Definition: r_raster.c:233
void D_symbol2(const SYMBOL *, double, double, const RGBA_Color *, const RGBA_Color *)
draw a symbol at pixel coordinates (alternate)
Definition: symbol.c:177
void D_fill(void)
Definition: draw2.c:329
void D_cont_abs(double, double)
Definition: draw2.c:310
double D_a_to_d_row(double)
array to screen (row)
Definition: cnversions.c:413
int D_parse_color(const char *, int)
color option text to usable color number
Definition: tran_colr.c:101
int D_d_color(DCELL, struct Colors *)
Same functionality as D_color() except that the value is type DCELL. This implies that the floating-p...
Definition: raster2.c:93
double D_get_d_north(void)
Definition: cnversions.c:195
void D_text_size(double, double)
Set text size (width and height)
Definition: r_raster.c:198
void D_RGB_color(int, int, int)
Definition: tran_colr.c:214
double D_get_ns_resolution(void)
Definition: cnversions.c:180
void D_get_text_box(const char *, double *, double *, double *, double *)
Definition: draw2.c:194
int D_save_command(const char *)
Append command to the cmd file (unused)
Definition: r_raster.c:179
int D_set_overlay_mode(int)
Configure raster overlay mode.
Definition: raster2.c:50
int D_draw_raster(int, const void *, struct Colors *, RASTER_MAP_TYPE)
Draw raster row.
double D_u_to_d_row(double)
earth to screen (north)
Definition: cnversions.c:446
void D_erase(const char *)
void D_plot_icon(double, double, int, double, double)
Plot icon.
Definition: icon.c:43
float FCELL
Definition: gis.h:604
Definition: gis.h:665
void D_symbol(const SYMBOL *, double, double, const RGBA_Color *, const RGBA_Color *)
draw a symbol at pixel coordinates
Definition: symbol.c:153
double D_get_d_west(void)
Definition: cnversions.c:193
void D_move_abs(double, double)
Definition: draw2.c:302
double D_get_a_west(void)
Definition: cnversions.c:188
void D_get_d(double [2][2])
Definition: cnversions.c:298
void D_end(void)
Definition: draw2.c:296
void D_show_conversions(void)
Definition: cnversions.c:110
void D_get_dst(double *, double *, double *, double *)
returns frame bounds in destination coordinate system
Definition: cnversions.c:274
double D_get_u_north(void)
Definition: cnversions.c:185
void D_get_src(double *, double *, double *, double *)
returns frame bounds in source coordinate system
Definition: cnversions.c:226
void D__erase(void)
Erase display (internal use only)
Definition: r_raster.c:187
double D_get_a_to_d_xconv(void)
Definition: cnversions.c:173
void D_polygon_rel(const double *, const double *, int)
Definition: draw2.c:461
int CELL
Definition: gis.h:602
void D_pos_abs(double, double)
Definition: draw2.c:218
void D_set_clip_window_to_map_window(void)
set graphical clipping window to map window
Definition: r_raster.c:360
int D_color_of_type(const void *, struct Colors *, RASTER_MAP_TYPE)
If the data_type is CELL_TYPE, calls D_color((CELL *value, colors); If the data_type is FCELL_TYPE...
Definition: raster2.c:134
void D_polydots_abs(const double *, const double *, int)
Definition: draw2.c:393
double D_u_to_d_col(double)
earth to screen (east)
Definition: cnversions.c:462
int RASTER_MAP_TYPE
Definition: raster.h:25
void D_set_reduction(double)
Definition: draw2.c:184
double D_a_to_u_col(double)
array to earth (column)
Definition: cnversions.c:397
int D_c_color(CELL, struct Colors *)
Definition: raster2.c:74
void D_polygon_abs(const double *, const double *, int)
Definition: draw2.c:386
int D_is_lat_lon(void)
Definition: cnversions.c:165
void D_box_abs(double, double, double, double)
Definition: draw2.c:408
void D_polydots_rel(const double *, const double *, int)
Definition: draw2.c:449
double D_get_u_to_a_xconv(void)
Definition: cnversions.c:177
void D_get_a(int [2][2])
Definition: cnversions.c:290
void D_get_u(double [2][2])
Definition: cnversions.c:282
void D_polyline_abs(const double *, const double *, int)
Definition: draw2.c:380
void D_set_region(const struct Cell_head *)
Definition: cnversions.c:198
double D_get_u_to_d_xconv(void)
Definition: cnversions.c:175
void D_setup2(int, int, double, double, double, double)
Sets source coordinate system.
double D_d_to_u_col(double)
screen to earth (x)
Definition: cnversions.c:364
double D_get_u_to_a_yconv(void)
Definition: cnversions.c:178
void D_set_src(double, double, double, double)
Definition: cnversions.c:205
void D_set_clip_mode(int)
Definition: draw2.c:179
void D_dots(void)
Definition: draw2.c:335
int D_open_driver(void)
Open display driver.
Definition: r_raster.c:81
void D_do_conversions(const struct Cell_head *, double, double, double, double)
initialize conversions
Definition: cnversions.c:152
void D_set_dst(double, double, double, double)
Definition: cnversions.c:251
void D_box_rel(double, double)
Definition: draw2.c:485
void D_text_rotation(double)
Set text rotation.
Definition: r_raster.c:208