GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-77aab223bc
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 */
void D_get_dst(double *, double *, double *, double *)
returns frame bounds in destination coordinate system
Definition: cnversions.c:345
void D_setup_unity(int)
Graphics frame setup.
Definition: display/setup.c:78
int D_parse_color(const char *, int)
color option text to usable color number
Definition: tran_colr.c:101
void D_line_rel(double, double, double, double)
Definition: draw2.c:471
int D_open_driver(void)
Open display driver.
Definition: r_raster.c:82
double D_get_a_south(void)
Definition: cnversions.c:247
void D_set_dst(double, double, double, double)
Definition: cnversions.c:322
void D_raster_draw_end(void)
Finish raster rendering.
double D_get_d_to_u_yconv(void)
Definition: cnversions.c:172
int D_draw_c_raster(int, const CELL *, struct Colors *)
Draw raster row (CELL)
double D_d_to_u_col(double)
screen to earth (x)
Definition: cnversions.c:432
double D_u_to_d_row(double)
earth to screen (north)
Definition: cnversions.c:509
void D_text_rotation(double)
Set text rotation.
Definition: r_raster.c:207
double D_get_d_to_a_xconv(void)
Definition: cnversions.c:160
double D_get_a_north(void)
Definition: cnversions.c:243
void D_stroke(void)
Definition: draw2.c:326
void D_get_grid(int *, int *, int *, int *)
Definition: cnversions.c:314
void D_cont_abs(double, double)
Definition: draw2.c:313
void D_cont_rel(double, double)
Definition: draw2.c:447
double D_get_u_to_d_yconv(void)
Definition: cnversions.c:196
void D_polydots_abs(const double *, const double *, int)
Definition: draw2.c:396
void D_end(void)
Definition: draw2.c:299
void D_line_abs(double, double, double, double)
Definition: draw2.c:402
void D_move_rel(double, double)
Definition: draw2.c:442
void D_symbol2(const SYMBOL *, double, double, const RGBA_Color *, const RGBA_Color *)
draw a symbol at pixel coordinates (alternate)
Definition: symbol.c:172
void D_polygon_rel(const double *, const double *, int)
Definition: draw2.c:464
int D_draw_f_raster(int, const FCELL *, struct Colors *)
Draw raster row (FCELL)
void D_set_clip_window_to_screen_window(void)
set clipping window to screen window
Definition: r_raster.c:379
void D_set_clip(double, double, double, double)
set clipping window
Definition: draw2.c:151
void D_set_clip_window_to_map_window(void)
set graphical clipping window to map window
Definition: r_raster.c:363
void D_fit_d_to_u(void)
Definition: cnversions.c:97
int D_c_color(CELL, struct Colors *)
Definition: raster2.c:71
void D_box_rel(double, double)
Definition: draw2.c:488
double D_get_u_south(void)
Definition: cnversions.c:230
double D_get_d_south(void)
Definition: cnversions.c:264
double D_get_u_to_a_yconv(void)
Definition: cnversions.c:204
void D_polyline_abs(const double *, const double *, int)
Definition: draw2.c:383
int D_save_command(const char *)
double D_get_ns_resolution(void)
Definition: cnversions.c:209
void D__erase(void)
Erase display (internal use only)
Definition: r_raster.c:186
double D_get_a_west(void)
Definition: cnversions.c:235
void D_erase(const char *)
double D_a_to_u_col(double)
array to earth (column)
Definition: cnversions.c:463
double D_get_d_west(void)
Definition: cnversions.c:252
void D_raster_draw_begin(void)
Prepare for raster graphic.
double D_get_a_to_d_xconv(void)
Definition: cnversions.c:184
double D_u_to_a_col(double)
earth to array (east
Definition: cnversions.c:554
void D_text_size(double, double)
Set text size (width and height)
Definition: r_raster.c:197
void D_polydots_rel(const double *, const double *, int)
Definition: draw2.c:452
int D_color_number_to_RGB(int, int *, int *, int *)
get RGB values from color number
Definition: tran_colr.c:177
void D_set_clip_window(double, double, double, double)
set graphical clipping window
Definition: r_raster.c:299
int D_draw_raster(int, const void *, struct Colors *, RASTER_MAP_TYPE)
Draw raster row.
void D_font_info(char ***, int *)
Get font info.
Definition: r_raster.c:264
void D_fill(void)
Definition: draw2.c:332
double D_get_ew_resolution(void)
Definition: cnversions.c:213
void D_show_conversions(void)
Definition: cnversions.c:107
int D_is_lat_lon(void)
Definition: cnversions.c:155
void D_set_clip_mode(int)
Definition: draw2.c:178
double D_u_to_d_col(double)
earth to screen (east)
Definition: cnversions.c:524
double D_get_d_north(void)
Definition: cnversions.c:260
void D_font_list(char ***, int *)
Get font list.
Definition: r_raster.c:253
double D_get_u_east(void)
Definition: cnversions.c:222
void D_pos_rel(double, double)
Definition: draw2.c:233
double D_a_to_u_row(double)
array to earth (row)
Definition: cnversions.c:447
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:90
void D_set_grid(int, int, int, int)
Definition: cnversions.c:305
void D_polygon_abs(const double *, const double *, int)
Definition: draw2.c:389
void D_update_conversions(void)
Definition: cnversions.c:90
double D_get_a_east(void)
Definition: cnversions.c:239
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:110
void D_font(const char *)
Choose font.
Definition: r_raster.c:232
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.
int D_set_overlay_mode(int)
Configure raster overlay mode.
Definition: raster2.c:48
double D_a_to_d_col(double)
array to screen (column)
Definition: cnversions.c:494
void D_text(const char *)
Draw text.
Definition: r_raster.c:220
double D_get_a_to_u_yconv(void)
Definition: cnversions.c:180
double D_d_to_u_row(double)
screen to earth (y)
Definition: cnversions.c:417
double D_get_u_to_a_xconv(void)
Definition: cnversions.c:200
double D_get_u_north(void)
Definition: cnversions.c:226
void D_symbol(const SYMBOL *, double, double, const RGBA_Color *, const RGBA_Color *)
draw a symbol at pixel coordinates
Definition: symbol.c:150
double D_get_u_to_d_xconv(void)
Definition: cnversions.c:192
int D_use_color(int)
draw with a color from D_parse_color
Definition: tran_colr.c:141
double D_get_d_east(void)
Definition: cnversions.c:256
void D_fit_u_to_d(void)
Definition: cnversions.c:102
void D_pos_abs(double, double)
Definition: draw2.c:222
void D_box_abs(double, double, double, double)
Definition: draw2.c:411
void D_close_driver(void)
Close display driver.
Definition: r_raster.c:163
void D_clip_to_map(void)
set clipping window to map window
Definition: draw2.c:170
void D_RGB_color(int, int, int)
Definition: tran_colr.c:211
double D_get_a_to_u_xconv(void)
Definition: cnversions.c:176
double D_get_a_to_d_yconv(void)
Definition: cnversions.c:188
int D_translate_color(const char *)
color name to number
Definition: tran_colr.c:125
void D_do_conversions(const struct Cell_head *, double, double, double, double)
initialize conversions
Definition: cnversions.c:143
void D_setup(int)
Graphics frame setup.
Definition: display/setup.c:46
void D_polyline_rel(const double *, const double *, int)
Definition: draw2.c:458
double D_u_to_a_row(double)
earth to array (north)
Definition: cnversions.c:539
void D_move_abs(double, double)
Definition: draw2.c:305
void D_get_screen(double *, double *, double *, double *)
get screen bounds
Definition: r_raster.c:345
void D_get_a(int[2][2])
Definition: cnversions.c:361
void D_setup2(int, int, double, double, double, double)
Sets source coordinate system.
const char * D_get_file(void)
Get driver output file.
int D_draw_d_raster(int, const DCELL *, struct Colors *)
Draw raster row (DCELL)
double D_get_u_west(void)
Definition: cnversions.c:218
void D_get_clip_window(double *, double *, double *, double *)
get graphical clipping window
Definition: r_raster.c:281
void D_set_region(const struct Cell_head *)
Definition: cnversions.c:269
void D_set_src(double, double, double, double)
Definition: cnversions.c:276
void D_dots(void)
Definition: draw2.c:338
double D_d_to_a_col(double)
screen to array (x)
Definition: cnversions.c:402
void D_close(void)
Definition: draw2.c:321
void D_get_u(double[2][2])
Definition: cnversions.c:353
double D_get_d_to_a_yconv(void)
Definition: cnversions.c:164
void D_set_reduction(double)
Definition: draw2.c:183
int D_color(CELL, struct Colors *)
Definition: raster2.c:65
double D_a_to_d_row(double)
array to screen (row)
Definition: cnversions.c:478
void D_begin(void)
Definition: draw2.c:294
void D_get_text_box(const char *, double *, double *, double *, double *)
Definition: draw2.c:193
void D_get_d(double[2][2])
Definition: cnversions.c:369
void D_plot_icon(double, double, int, double, double)
Plot icon.
Definition: icon.c:43
double D_d_to_a_row(double)
screen to array (y)
Definition: cnversions.c:387
void D_get_src(double *, double *, double *, double *)
returns frame bounds in source coordinate system
Definition: cnversions.c:297
void D_get_frame(double *, double *, double *, double *)
get graphical window (frame)
Definition: r_raster.c:325
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:131
void D_encoding(const char *)
Set encoding.
Definition: r_raster.c:242
void D_line_width(double)
Definition: draw2.c:188
double D_get_d_to_u_xconv(void)
Definition: cnversions.c:168
float FCELL
Definition: gis.h:630
double DCELL
Definition: gis.h:629
int CELL
Definition: gis.h:628
int RASTER_MAP_TYPE
Definition: raster.h:25
2D/3D raster map header (used also for region)
Definition: gis.h:440
Definition: gis.h:686
Definition: symbol.h:60