GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Go to the source code of this file.
Functions | |
void | D_update_conversions (void) |
void | D_fit_d_to_u (void) |
void | D_fit_u_to_d (void) |
void | D_show_conversions (void) |
void | D_do_conversions (const struct Cell_head *, double, double, double, double) |
initialize conversions More... | |
int | D_is_lat_lon (void) |
double | D_get_d_to_a_xconv (void) |
double | D_get_d_to_a_yconv (void) |
double | D_get_d_to_u_xconv (void) |
double | D_get_d_to_u_yconv (void) |
double | D_get_a_to_u_xconv (void) |
double | D_get_a_to_u_yconv (void) |
double | D_get_a_to_d_xconv (void) |
double | D_get_a_to_d_yconv (void) |
double | D_get_u_to_d_xconv (void) |
double | D_get_u_to_d_yconv (void) |
double | D_get_u_to_a_xconv (void) |
double | D_get_u_to_a_yconv (void) |
double | D_get_ns_resolution (void) |
double | D_get_ew_resolution (void) |
double | D_get_u_west (void) |
double | D_get_u_east (void) |
double | D_get_u_north (void) |
double | D_get_u_south (void) |
double | D_get_a_west (void) |
double | D_get_a_east (void) |
double | D_get_a_north (void) |
double | D_get_a_south (void) |
double | D_get_d_west (void) |
double | D_get_d_east (void) |
double | D_get_d_north (void) |
double | D_get_d_south (void) |
void | D_set_region (const struct Cell_head *) |
void | D_set_src (double, double, double, double) |
void | D_get_src (double *, double *, double *, double *) |
returns frame bounds in source coordinate system More... | |
void | D_set_grid (int, int, int, int) |
void | D_get_grid (int *, int *, int *, int *) |
void | D_set_dst (double, double, double, double) |
void | D_get_dst (double *, double *, double *, double *) |
returns frame bounds in destination coordinate system More... | |
void | D_get_u (double[2][2]) |
void | D_get_a (int[2][2]) |
void | D_get_d (double[2][2]) |
double | D_d_to_a_row (double) |
screen to array (y) More... | |
double | D_d_to_a_col (double) |
screen to array (x) More... | |
double | D_d_to_u_row (double) |
screen to earth (y) More... | |
double | D_d_to_u_col (double) |
screen to earth (x) More... | |
double | D_a_to_u_row (double) |
array to earth (row) More... | |
double | D_a_to_u_col (double) |
array to earth (column) More... | |
double | D_a_to_d_row (double) |
array to screen (row) More... | |
double | D_a_to_d_col (double) |
array to screen (column) More... | |
double | D_u_to_d_row (double) |
earth to screen (north) More... | |
double | D_u_to_d_col (double) |
earth to screen (east) More... | |
double | D_u_to_a_row (double) |
earth to array (north) More... | |
double | D_u_to_a_col (double) |
earth to array (east More... | |
void | D_set_clip (double, double, double, double) |
set clipping window More... | |
void | D_clip_to_map (void) |
set clipping window to map window More... | |
void | D_set_clip_mode (int) |
void | D_set_reduction (double) |
void | D_line_width (double) |
void | D_get_text_box (const char *, double *, double *, double *, double *) |
void | D_pos_abs (double, double) |
void | D_pos_rel (double, double) |
void | D_move_abs (double, double) |
void | D_move_rel (double, double) |
void | D_cont_abs (double, double) |
void | D_cont_rel (double, double) |
void | D_line_abs (double, double, double, double) |
void | D_line_rel (double, double, double, double) |
void | D_polydots_abs (const double *, const double *, int) |
void | D_polydots_rel (const double *, const double *, int) |
void | D_polyline_abs (const double *, const double *, int) |
void | D_polyline_rel (const double *, const double *, int) |
void | D_polygon_abs (const double *, const double *, int) |
void | D_polygon_rel (const double *, const double *, int) |
void | D_box_abs (double, double, double, double) |
void | D_box_rel (double, double) |
void | D_begin (void) |
void | D_end (void) |
void | D_close (void) |
void | D_stroke (void) |
void | D_fill (void) |
void | D_dots (void) |
void | D_plot_icon (double, double, int, double, double) |
Plot icon. More... | |
int | D_draw_raster (int, const void *, struct Colors *, RASTER_MAP_TYPE) |
Draw raster row. More... | |
int | D_draw_d_raster (int, const DCELL *, struct Colors *) |
Draw raster row (DCELL) More... | |
int | D_draw_f_raster (int, const FCELL *, struct Colors *) |
Draw raster row (FCELL) More... | |
int | D_draw_c_raster (int, const CELL *, struct Colors *) |
Draw raster row (CELL) More... | |
void | D_raster_draw_begin (void) |
Prepare for raster graphic. More... | |
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. More... | |
void | D_raster_draw_end (void) |
Finish raster rendering. More... | |
int | D_set_overlay_mode (int) |
Configure raster overlay mode. More... | |
int | D_color (CELL, struct Colors *) |
int | D_c_color (CELL, struct Colors *) |
int | D_d_color (DCELL, struct Colors *) |
Same functionality as D_color() except that the value is type DCELL . This implies that the floating-point interfaces to the colors are used by this routine. More... | |
int | D_f_color (FCELL, struct Colors *) |
Same functionality as D_color() except that the value is type FCELL . This implies that the floating-point interfaces to the colors are used by this routine. More... | |
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, calls D_f_color((FCELL *value, colors); If the data_type is DCELL_TYPE, calls D_d_color((DCELL *value, colors);. More... | |
void | D_setup (int) |
Graphics frame setup. More... | |
void | D_setup_unity (int) |
Graphics frame setup. More... | |
void | D_setup2 (int, int, double, double, double, double) |
Sets source coordinate system. More... | |
void | D_symbol (const SYMBOL *, double, double, const RGBA_Color *, const RGBA_Color *) |
draw a symbol at pixel coordinates More... | |
void | D_symbol2 (const SYMBOL *, double, double, const RGBA_Color *, const RGBA_Color *) |
draw a symbol at pixel coordinates (alternate) More... | |
int | D_translate_color (const char *) |
color name to number More... | |
int | D_parse_color (const char *, int) |
color option text to usable color number More... | |
int | D_use_color (int) |
draw with a color from D_parse_color More... | |
int | D_color_number_to_RGB (int, int *, int *, int *) |
get RGB values from color number More... | |
void | D_RGB_color (int, int, int) |
void | D_erase (const char *) |
int | D_open_driver (void) |
Open display driver. More... | |
void | D_close_driver (void) |
Close display driver. More... | |
int | D_save_command (const char *) |
void | D__erase (void) |
Erase display (internal use only) More... | |
void | D_text_size (double, double) |
Set text size (width and height) More... | |
void | D_text_rotation (double) |
Set text rotation. More... | |
void | D_text (const char *) |
Draw text. More... | |
void | D_font (const char *) |
Choose font. More... | |
void | D_encoding (const char *) |
Set encoding. More... | |
void | D_font_list (char ***, int *) |
Get font list. More... | |
void | D_font_info (char ***, int *) |
Get font info. More... | |
void | D_get_clip_window (double *, double *, double *, double *) |
get graphical clipping window More... | |
void | D_set_clip_window (double, double, double, double) |
set graphical clipping window More... | |
void | D_get_frame (double *, double *, double *, double *) |
get graphical window (frame) More... | |
void | D_get_screen (double *, double *, double *, double *) |
get screen bounds More... | |
void | D_set_clip_window_to_map_window (void) |
set graphical clipping window to map window More... | |
void | D_set_clip_window_to_screen_window (void) |
set clipping window to screen window More... | |
const char * | D_get_file (void) |
Get driver output file. More... | |
void D__erase | ( | void | ) |
Erase display (internal use only)
Definition at line 186 of file r_raster.c.
References COM_Erase().
double D_a_to_d_col | ( | double | A_col | ) |
array to screen (column)
Returns an x value in the screen coordinate system when provided the corresponding column value in the array coordinate system.
A_col | column |
Definition at line 494 of file cnversions.c.
double D_a_to_d_row | ( | double | A_row | ) |
array to screen (row)
Returns a y value in the screen coordinate system when provided the corresponding row value in the array coordinate system.
A_row | row |
Definition at line 478 of file cnversions.c.
double D_a_to_u_col | ( | double | A_col | ) |
array to earth (column)
Returns an x value in the earth coordinate system when provided the corresponding column value in the array coordinate system.
A_col | column |
Definition at line 463 of file cnversions.c.
double D_a_to_u_row | ( | double | A_row | ) |
array to earth (row)
Returns a y value in the earth coordinate system when provided the corresponding row value in the array coordinate system.
A_row | row |
Definition at line 447 of file cnversions.c.
void D_begin | ( | void | ) |
Definition at line 294 of file draw2.c.
References path_begin().
void D_box_abs | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2 | ||
) |
void D_clip_to_map | ( | void | ) |
set clipping window to map window
Sets the clipping window to the pixel window that corresponds to the current database region. This is the default.
~ |
Definition at line 170 of file draw2.c.
References b, D_get_src(), D_set_clip(), l, r, and t.
void D_close | ( | void | ) |
Definition at line 321 of file draw2.c.
References path_close().
void D_close_driver | ( | void | ) |
Close display driver.
If GRASS_NOTIFY is defined, run notifier.
Definition at line 163 of file r_raster.c.
References _, COM_Graph_close(), and G_warning().
int D_color_number_to_RGB | ( | int | color, |
int * | r, | ||
int * | g, | ||
int * | b | ||
) |
get RGB values from color number
Translates the color number provided by D_parse_color into 0-255 RGB values.
Returns 1 if color can be used to draw (is good and isn't 'none'), 0 otherwise.
color_number | |
red | |
green | |
blue |
Definition at line 177 of file tran_colr.c.
int D_color_of_type | ( | const void * | raster, |
struct Colors * | colors, | ||
RASTER_MAP_TYPE | data_type | ||
) |
void D_cont_abs | ( | double | x, |
double | y | ||
) |
Definition at line 313 of file draw2.c.
References path_cont(), x, and vertex::y.
Referenced by D_cont_rel().
void D_cont_rel | ( | double | x, |
double | y | ||
) |
Definition at line 447 of file draw2.c.
References D_cont_abs().
double D_d_to_a_col | ( | double | D_col | ) |
screen to array (x)
Returns a column value in the array coordinate system when provided the corresponding x value in the screen coordinate system.
D_col | x |
Definition at line 402 of file cnversions.c.
double D_d_to_a_row | ( | double | D_row | ) |
screen to array (y)
Returns a row value in the array coordinate system when provided the corresponding y value in the screen coordinate system.
D_row | y |
Definition at line 387 of file cnversions.c.
double D_d_to_u_col | ( | double | D_col | ) |
screen to earth (x)
Returns an east value in the earth coordinate system when provided the corresponding x value in the screen coordinate system.
D_col | x |
Definition at line 432 of file cnversions.c.
Referenced by D_get_text_box().
double D_d_to_u_row | ( | double | D_row | ) |
screen to earth (y)
Returns a north value in the earth coordinate system when provided the corresponding y value in the screen coordinate system.
D_row | y |
Definition at line 417 of file cnversions.c.
Referenced by D_get_text_box().
void D_do_conversions | ( | const struct Cell_head * | window, |
double | t, | ||
double | b, | ||
double | l, | ||
double | r | ||
) |
initialize conversions
The relationship between the earth region and the top, bottom, left, and right screen coordinates is established, which then allows conversions between all three coordinate systems to be performed. Note this routine is called by D_setup.
window | region |
t | top |
b | bottom |
l | left |
r | right |
Definition at line 143 of file cnversions.c.
Draw raster row (CELL)
The row gives the map array row. The carray array provides the categories for each raster value in that row. This routine is called consecutively with the information necessary to draw a raster image from north to south. No rows can be skipped. All screen pixel rows which represent the current map array row are rendered. The routine returns the map array row which is needed to draw the next screen pixel row.
A_row | row number (starts at 0) |
carray | data buffer |
colors | pointer to Colors structure |
Definition at line 104 of file display/raster.c.
Draw raster row (DCELL)
A_row | row number (starts at 0) |
darray | data buffer |
colors | pointer to Colors structure |
Definition at line 66 of file display/raster.c.
Draw raster row (FCELL)
A_row | row number (starts at 0) |
farray | data buffer |
colors | pointer to Colors structure |
Definition at line 81 of file display/raster.c.
int D_draw_raster | ( | int | A_row, |
const void * | array, | ||
struct Colors * | colors, | ||
RASTER_MAP_TYPE | data_type | ||
) |
Draw raster row.
Presumes the map is drawn from north to south.
If overlay mode is desired, then call D_set_overlay_mode() first.
A_row | row number (starts at 0) |
array | data buffer |
colors | pointer to Colors structure |
data_type | raster type (CELL, FCELL, DCELL) |
Definition at line 51 of file display/raster.c.
int D_draw_raster_RGB | ( | int | A_row, |
const void * | r_raster, | ||
const void * | g_raster, | ||
const void * | b_raster, | ||
struct Colors * | r_colors, | ||
struct Colors * | g_colors, | ||
struct Colors * | b_colors, | ||
RASTER_MAP_TYPE | r_type, | ||
RASTER_MAP_TYPE | g_type, | ||
RASTER_MAP_TYPE | b_type | ||
) |
Draw raster row in RGB mode.
A_row | row number (starts at 0) |
r_raster | red data buffer |
g_raster | green data buffer |
b_raster | blue data buffer |
r_colors | colors used for red channel |
g_colors | colors used for green channel |
b_colors | colors used for blue channel |
r_type | raster type used for red channel |
g_type | raster type used for red channel |
b_type | raster type used for red channel |
Definition at line 173 of file display/raster.c.
void D_encoding | ( | const char * | name | ) |
Set encoding.
name | encoding name |
Definition at line 242 of file r_raster.c.
References COM_Set_encoding(), and name.
void D_erase | ( | const char * | color | ) |
Definition at line 12 of file display/window.c.
References b, COM_Begin(), COM_Close(), COM_Cont(), COM_Fill(), COM_Move(), D_get_dst(), D_parse_color(), D_use_color(), l, r, and t.
Referenced by D_setup2(), and D_setup_unity().
void D_fit_d_to_u | ( | void | ) |
Definition at line 97 of file cnversions.c.
Referenced by D_setup2().
void D_fit_u_to_d | ( | void | ) |
Definition at line 102 of file cnversions.c.
void D_font | ( | const char * | name | ) |
Choose font.
Set current font to font name.
name | font name |
Definition at line 232 of file r_raster.c.
References COM_Set_font(), and name.
void D_font_info | ( | char *** | list, |
int * | count | ||
) |
Get font info.
[out] | list | list of font info |
[out] | number | of items in the list |
Definition at line 264 of file r_raster.c.
References COM_Font_info(), and count.
void D_font_list | ( | char *** | list, |
int * | count | ||
) |
Get font list.
[out] | list | list of font names |
[out] | number | of items in the list |
Definition at line 253 of file r_raster.c.
References COM_Font_list(), and count.
void D_get_a | ( | int | x[2][2] | ) |
double D_get_a_east | ( | void | ) |
Definition at line 239 of file cnversions.c.
double D_get_a_north | ( | void | ) |
Definition at line 243 of file cnversions.c.
double D_get_a_south | ( | void | ) |
Definition at line 247 of file cnversions.c.
double D_get_a_to_d_xconv | ( | void | ) |
Definition at line 184 of file cnversions.c.
double D_get_a_to_d_yconv | ( | void | ) |
Definition at line 188 of file cnversions.c.
double D_get_a_to_u_xconv | ( | void | ) |
Definition at line 176 of file cnversions.c.
Referenced by D_get_ew_resolution().
double D_get_a_to_u_yconv | ( | void | ) |
Definition at line 180 of file cnversions.c.
Referenced by D_get_ns_resolution().
double D_get_a_west | ( | void | ) |
Definition at line 235 of file cnversions.c.
void D_get_clip_window | ( | double * | t, |
double * | b, | ||
double * | l, | ||
double * | r | ||
) |
get graphical clipping window
Queries the graphical clipping window (origin is top right)
[out] | t | top edge of clip window |
[out] | b | bottom edge of clip window |
[out] | l | left edge of clip window |
[out] | r | right edge of clip window |
Definition at line 281 of file r_raster.c.
References b, COM_Get_window(), l, r, and t.
void D_get_d | ( | double | x[2][2] | ) |
double D_get_d_east | ( | void | ) |
Definition at line 256 of file cnversions.c.
Referenced by D_set_clip_window_to_map_window().
double D_get_d_north | ( | void | ) |
Definition at line 260 of file cnversions.c.
Referenced by D_set_clip_window_to_map_window().
double D_get_d_south | ( | void | ) |
Definition at line 264 of file cnversions.c.
Referenced by D_set_clip_window_to_map_window().
double D_get_d_to_a_xconv | ( | void | ) |
Definition at line 160 of file cnversions.c.
double D_get_d_to_a_yconv | ( | void | ) |
Definition at line 164 of file cnversions.c.
double D_get_d_to_u_xconv | ( | void | ) |
Definition at line 168 of file cnversions.c.
double D_get_d_to_u_yconv | ( | void | ) |
Definition at line 172 of file cnversions.c.
double D_get_d_west | ( | void | ) |
Definition at line 252 of file cnversions.c.
Referenced by D_set_clip_window_to_map_window().
void D_get_dst | ( | double * | t, |
double * | b, | ||
double * | l, | ||
double * | r | ||
) |
returns frame bounds in destination coordinate system
D_get_dst() returns the frame bounds in the destination coordinate system (used by R_* commands). The various D_setup() commands all set the destination coordinate system to the current frame reported by R_get_window().
t | top |
b | bottom |
l | left |
r | right |
Definition at line 345 of file cnversions.c.
References t.
Referenced by D_erase().
double D_get_ew_resolution | ( | void | ) |
Definition at line 213 of file cnversions.c.
References D_get_a_to_u_xconv().
const char* D_get_file | ( | void | ) |
Get driver output file.
Definition at line 141 of file display/setup.c.
References COM_Graph_get_file().
void D_get_frame | ( | double * | t, |
double * | b, | ||
double * | l, | ||
double * | r | ||
) |
get graphical window (frame)
Queries the graphical frame (origin is top right)
[out] | t | top edge of frame |
[out] | b | bottom edge of frame |
[out] | l | left edge of frame |
[out] | r | right edge of frame |
Definition at line 325 of file r_raster.c.
References t.
Referenced by D_setup2(), and D_setup_unity().
void D_get_grid | ( | int * | t, |
int * | b, | ||
int * | l, | ||
int * | r | ||
) |
Definition at line 314 of file cnversions.c.
References t.
double D_get_ns_resolution | ( | void | ) |
Definition at line 209 of file cnversions.c.
References D_get_a_to_u_yconv().
void D_get_screen | ( | double * | t, |
double * | b, | ||
double * | l, | ||
double * | r | ||
) |
get screen bounds
Queries the screen bounds (origin is top right)
[out] | t | top edge of screen |
[out] | b | bottom edge of screen |
[out] | l | left edge of screen |
[out] | r | right edge of screen |
Definition at line 345 of file r_raster.c.
References t.
void D_get_src | ( | double * | t, |
double * | b, | ||
double * | l, | ||
double * | r | ||
) |
returns frame bounds in source coordinate system
D_get_src() returns the frame bounds in the source coordinate system (used by D_* functions)
t | top |
b | bottom |
l | left |
r | right |
Definition at line 297 of file cnversions.c.
References t.
Referenced by D_clip_to_map().
void D_get_text_box | ( | const char * | text, |
double * | t, | ||
double * | b, | ||
double * | l, | ||
double * | r | ||
) |
Definition at line 193 of file draw2.c.
References b, COM_Get_text_box(), D_d_to_u_col(), D_d_to_u_row(), l, r, and t.
void D_get_u | ( | double | x[2][2] | ) |
Definition at line 353 of file cnversions.c.
References x.
double D_get_u_east | ( | void | ) |
Definition at line 222 of file cnversions.c.
double D_get_u_north | ( | void | ) |
Definition at line 226 of file cnversions.c.
double D_get_u_south | ( | void | ) |
Definition at line 230 of file cnversions.c.
double D_get_u_to_a_xconv | ( | void | ) |
Definition at line 200 of file cnversions.c.
double D_get_u_to_a_yconv | ( | void | ) |
Definition at line 204 of file cnversions.c.
double D_get_u_to_d_xconv | ( | void | ) |
Definition at line 192 of file cnversions.c.
double D_get_u_to_d_yconv | ( | void | ) |
Definition at line 196 of file cnversions.c.
double D_get_u_west | ( | void | ) |
Definition at line 218 of file cnversions.c.
int D_is_lat_lon | ( | void | ) |
Definition at line 155 of file cnversions.c.
void D_line_abs | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2 | ||
) |
void D_line_rel | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2 | ||
) |
void D_move_abs | ( | double | x, |
double | y | ||
) |
Definition at line 305 of file draw2.c.
References path_move(), x, and vertex::y.
Referenced by D_move_rel().
void D_move_rel | ( | double | x, |
double | y | ||
) |
Definition at line 442 of file draw2.c.
References D_move_abs().
int D_open_driver | ( | void | ) |
Open display driver.
Default display driver is Cairo, if not available PNG is used.
Definition at line 82 of file r_raster.c.
int D_parse_color | ( | const char * | str, |
int | none_acceptable | ||
) |
color option text to usable color number
Converts or looks up the color provided in the string. Returns a color number usable by D_use_color. If the color does not exist exits with a fatal error and message. If the color is none and none_acceptable is not true exits with a fatal error and message.
name_or_code | |
none_acceptable |
Definition at line 101 of file tran_colr.c.
Referenced by D_erase(), and D_translate_color().
void D_plot_icon | ( | double | xc, |
double | yc, | ||
int | type, | ||
double | angle, | ||
double | scale | ||
) |
void D_polydots_abs | ( | const double * | x, |
const double * | y, | ||
int | n | ||
) |
void D_polydots_rel | ( | const double * | x, |
const double * | y, | ||
int | n | ||
) |
void D_polygon_abs | ( | const double * | x, |
const double * | y, | ||
int | n | ||
) |
void D_polygon_rel | ( | const double * | x, |
const double * | y, | ||
int | n | ||
) |
void D_polyline_abs | ( | const double * | x, |
const double * | y, | ||
int | n | ||
) |
void D_polyline_rel | ( | const double * | x, |
const double * | y, | ||
int | n | ||
) |
void D_pos_abs | ( | double | x, |
double | y | ||
) |
Definition at line 222 of file draw2.c.
Referenced by D_pos_rel().
void D_pos_rel | ( | double | x, |
double | y | ||
) |
Definition at line 233 of file draw2.c.
References D_pos_abs().
void D_raster_draw_begin | ( | void | ) |
Prepare for raster graphic.
The raster display subsystem establishes conversion parameters based on the screen extent defined by top, bottom, left, and right, all of which are obtainable from D_get_dst() for the current frame.
Definition at line 148 of file display/raster.c.
References COM_begin_raster(), D__overlay_mode, D_get_a(), D_get_d(), dst, and src.
void D_raster_draw_end | ( | void | ) |
Finish raster rendering.
Definition at line 225 of file display/raster.c.
References COM_end_raster().
void D_RGB_color | ( | int | red, |
int | grn, | ||
int | blu | ||
) |
Definition at line 211 of file tran_colr.c.
References COM_Color_RGB().
int D_save_command | ( | const char * | ) |
void D_set_clip | ( | double | t, |
double | b, | ||
double | l, | ||
double | r | ||
) |
void D_set_clip_window | ( | double | t, |
double | b, | ||
double | l, | ||
double | r | ||
) |
set graphical clipping window
Sets the graphical clipping window to the specified rectangle (origin is top right)
t | top edge of clip window |
b | bottom edge of clip window |
l | left edge of clip window |
r | right edge of clip window |
Definition at line 299 of file r_raster.c.
References t.
Referenced by D_set_clip_window_to_map_window().
void D_set_clip_window_to_map_window | ( | void | ) |
set graphical clipping window to map window
Sets the graphical clipping window to the pixel window that corresponds to the current database region.
~ |
Definition at line 363 of file r_raster.c.
References D_get_d_east(), D_get_d_north(), D_get_d_south(), D_get_d_west(), and D_set_clip_window().
Referenced by D_setup2(), and D_setup_unity().
void D_set_clip_window_to_screen_window | ( | void | ) |
set clipping window to screen window
Sets the clipping window to the pixel window that corresponds to the full screen window. Off screen rendering is still clipped.
~ |
Definition at line 379 of file r_raster.c.
References COM_Set_window().
Referenced by D_setup2(), and D_setup_unity().
void D_set_dst | ( | double | t, |
double | b, | ||
double | l, | ||
double | r | ||
) |
Definition at line 322 of file cnversions.c.
Referenced by D_setup2(), and D_setup_unity().
void D_set_grid | ( | int | t, |
int | b, | ||
int | l, | ||
int | r | ||
) |
Definition at line 305 of file cnversions.c.
int D_set_overlay_mode | ( | int | n | ) |
Configure raster overlay mode.
This routine determines if D_draw_raster() draws in overlay mode (locations with category 0 are left untouched) or not (colored with the color for category 0).
n | 1 (TRUE) for overlay mode; 0 (FALSE) otherwise |
Definition at line 48 of file raster2.c.
References D__overlay_mode.
void D_set_region | ( | const struct Cell_head * | window | ) |
Definition at line 269 of file cnversions.c.
void D_set_src | ( | double | t, |
double | b, | ||
double | l, | ||
double | r | ||
) |
Definition at line 276 of file cnversions.c.
Referenced by D_setup2(), and D_setup_unity().
void D_setup | ( | int | clear | ) |
Graphics frame setup.
This is a high level D call. It does a full setup for the current graphics frame.
Note: Connection to driver must already be made.
Sets the source coordinate system to the current region, and adjusts the destination coordinate system to preserve the aspect ratio.
Performs a full setup for the current graphics frame:
If clear is true, the frame is cleared (same as running d.erase.) Otherwise, it is not cleared.
clear | 1 to clear frame (visually and coordinates) |
Definition at line 46 of file display/setup.c.
void D_setup2 | ( | int | clear, |
int | fit, | ||
double | st, | ||
double | sb, | ||
double | sl, | ||
double | sr | ||
) |
Sets source coordinate system.
Sets the source coordinate system to its arguments, and if the fit argument is non-zero, adjusts the destination coordinate system to preserve the aspect ratio.
If clear is true, the frame is cleared (same as running d.erase). Otherwise, it is not cleared.
clear | non-zero code to clear the frame |
fit | non-zero code to adjust destination coordinate system |
s_top | |
s_bottom | |
s_left | |
s_right |
Definition at line 114 of file display/setup.c.
References D_erase(), D_fit_d_to_u(), D_get_frame(), D_set_clip_window_to_map_window(), D_set_clip_window_to_screen_window(), D_set_dst(), D_set_src(), D_update_conversions(), DEFAULT_BG_COLOR, and st.
void D_setup_unity | ( | int | clear | ) |
Graphics frame setup.
Sets the source coordinate system to match the destination coordinate system, so that D_* functions use the same coordinate system as R_* functions.
If clear is true, the frame is cleared (same as running d.erase). Otherwise, it is not cleared.
clear | non-zero code to clear the frame |
Definition at line 78 of file display/setup.c.
References D_erase(), D_get_frame(), D_set_clip_window_to_map_window(), D_set_clip_window_to_screen_window(), D_set_dst(), D_set_src(), D_update_conversions(), and DEFAULT_BG_COLOR.
void D_show_conversions | ( | void | ) |
Definition at line 107 of file cnversions.c.
void D_symbol | ( | const SYMBOL * | Symb, |
double | x0, | ||
double | y0, | ||
const RGBA_Color * | line_color, | ||
const RGBA_Color * | fill_color | ||
) |
draw a symbol at pixel coordinates
Draws a symbol (one of $GISBASE/etc/symbols/) to the active display. The starting x0,y0 coordinate corresponds to the center of the icon. The symbol must be pre-processed with S_stroke() before being sent to this function.
Symb | The symbol name (e.g. basic/circle) |
x0 | The starting x display coordinate (pixel) |
y0 | The starting y display coordinate (pixel) |
line_color | Outline color |
fill_color | Fill color |
void D_symbol2 | ( | const SYMBOL * | Symb, |
double | x0, | ||
double | y0, | ||
const RGBA_Color * | primary_color, | ||
const RGBA_Color * | secondary_color | ||
) |
draw a symbol at pixel coordinates (alternate)
Draws a symbol (one of $GISBASE/etc/symbols/) to the active display. The same as D_symbol(), but it uses a primary and secondary color instead of line and fill color. The primary color is used to draw stroke lines (STRINGs) and as the fill color for polygons. The secondary color is used for polygon outlines.
Symb | The symbol name (e.g. basic/circle) |
x0 | The starting x display coordinate (pixel) |
y0 | The starting y display coordinate (pixel) |
primary_color | Primary draw color |
secondary_color | Secondary draw color |
void D_text | ( | const char * | text | ) |
Draw text.
Writes text in the current color and font, at the current text width and height, starting at the current screen location.
text | text to be drawn |
Definition at line 220 of file r_raster.c.
References COM_Text().
void D_text_rotation | ( | double | rotation | ) |
Set text rotation.
rotation | value |
Definition at line 207 of file r_raster.c.
References COM_Text_rotation().
void D_text_size | ( | double | width, |
double | height | ||
) |
Set text size (width and height)
width | text pixel width |
height | text pixel height |
Definition at line 197 of file r_raster.c.
int D_translate_color | ( | const char * | str | ) |
color name to number
Takes a color name in ascii and returns the color number for that color. Returns 0 if color is not known. The color number returned is for lines and text, not raster graphics.
name |
Definition at line 125 of file tran_colr.c.
References D_parse_color().
double D_u_to_a_col | ( | double | U_col | ) |
earth to array (east
Returns a column value in the array coordinate system when provided the corresponding east value in the earth coordinate system.
U_col | east |
Definition at line 554 of file cnversions.c.
double D_u_to_a_row | ( | double | U_row | ) |
earth to array (north)
Returns a row value in the array coordinate system when provided the corresponding north value in the earth coordinate system.
U_row | north |
Definition at line 539 of file cnversions.c.
double D_u_to_d_col | ( | double | U_col | ) |
earth to screen (east)
Returns an x value in the screen coordinate system when provided the corresponding east value in the earth coordinate system.
U_col | east |
Definition at line 524 of file cnversions.c.
double D_u_to_d_row | ( | double | U_row | ) |
earth to screen (north)
Returns a y value in the screen coordinate system when provided the corresponding north value in the earth coordinate system.
U_row | north |
Definition at line 509 of file cnversions.c.
void D_update_conversions | ( | void | ) |
Definition at line 90 of file cnversions.c.
Referenced by D_setup2(), and D_setup_unity().
int D_use_color | ( | int | color | ) |
draw with a color from D_parse_color
Calls R_color or R_standard_color to use the color provided by D_parse_color. Returns 1 if color can be used to draw (is good and isn't none), 0 otherwise.
color |
Definition at line 141 of file tran_colr.c.
References COM_Standard_color(), and G_num_standard_colors().
Referenced by D_erase().