GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
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 *) |
Append command to the cmd file (unused) More... | |
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 187 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 430 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 413 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 397 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 380 of file cnversions.c.
void D_begin | ( | void | ) |
Definition at line 291 of file draw2.c.
References path_begin().
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 171 of file draw2.c.
References b, D_get_src(), D_set_clip(), l, r, and t.
void D_close | ( | void | ) |
Definition at line 318 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 164 of file r_raster.c.
References COM_Graph_close(), and getenv().
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 180 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 | , |
double | |||
) |
void D_cont_rel | ( | double | , |
double | |||
) |
Definition at line 444 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 332 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 316 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 364 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 348 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 152 of file cnversions.c.
Referenced by D_setup().
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 105 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 67 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 82 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 177 of file display/raster.c.
void D_encoding | ( | const char * | name | ) |
Set encoding.
name | encoding name |
Definition at line 243 of file r_raster.c.
References COM_Set_encoding().
void D_erase | ( | const char * | ) |
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_setup(), D_setup2(), and D_setup_unity().
void D_fit_d_to_u | ( | void | ) |
Definition at line 100 of file cnversions.c.
Referenced by D_setup2().
void D_fit_u_to_d | ( | void | ) |
Definition at line 105 of file cnversions.c.
void D_font | ( | const char * | name | ) |
Choose font.
Set current font to font name.
name | font name |
Definition at line 233 of file r_raster.c.
References COM_Set_font().
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 265 of file r_raster.c.
References COM_Font_info().
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 254 of file r_raster.c.
References COM_Font_list().
void D_get_a | ( | int | [2][2] | ) |
Definition at line 290 of file cnversions.c.
Referenced by D_raster_draw_begin().
double D_get_a_east | ( | void | ) |
Definition at line 189 of file cnversions.c.
double D_get_a_north | ( | void | ) |
Definition at line 190 of file cnversions.c.
double D_get_a_south | ( | void | ) |
Definition at line 191 of file cnversions.c.
double D_get_a_to_d_xconv | ( | void | ) |
Definition at line 173 of file cnversions.c.
double D_get_a_to_d_yconv | ( | void | ) |
Definition at line 174 of file cnversions.c.
double D_get_a_to_u_xconv | ( | void | ) |
Definition at line 171 of file cnversions.c.
Referenced by D_get_ew_resolution().
double D_get_a_to_u_yconv | ( | void | ) |
Definition at line 172 of file cnversions.c.
Referenced by D_get_ns_resolution().
double D_get_a_west | ( | void | ) |
Definition at line 188 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 282 of file r_raster.c.
References COM_Get_window().
void D_get_d | ( | double | [2][2] | ) |
Definition at line 298 of file cnversions.c.
double D_get_d_east | ( | void | ) |
Definition at line 194 of file cnversions.c.
Referenced by D_set_clip_window_to_map_window().
double D_get_d_north | ( | void | ) |
Definition at line 195 of file cnversions.c.
Referenced by D_set_clip_window_to_map_window().
double D_get_d_south | ( | void | ) |
Definition at line 196 of file cnversions.c.
Referenced by D_set_clip_window_to_map_window().
double D_get_d_to_a_xconv | ( | void | ) |
Definition at line 167 of file cnversions.c.
double D_get_d_to_a_yconv | ( | void | ) |
Definition at line 168 of file cnversions.c.
double D_get_d_to_u_xconv | ( | void | ) |
Definition at line 169 of file cnversions.c.
double D_get_d_to_u_yconv | ( | void | ) |
Definition at line 170 of file cnversions.c.
double D_get_d_west | ( | void | ) |
Definition at line 193 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 274 of file cnversions.c.
Referenced by D_erase().
double D_get_ew_resolution | ( | void | ) |
Definition at line 181 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 322 of file r_raster.c.
Referenced by D_setup(), D_setup2(), and D_setup_unity().
void D_get_grid | ( | int * | , |
int * | , | ||
int * | , | ||
int * | |||
) |
Definition at line 243 of file cnversions.c.
double D_get_ns_resolution | ( | void | ) |
Definition at line 180 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 342 of file r_raster.c.
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 226 of file cnversions.c.
Referenced by D_clip_to_map().
void D_get_text_box | ( | const char * | , |
double * | , | ||
double * | , | ||
double * | , | ||
double * | |||
) |
Definition at line 194 of file draw2.c.
References COM_Get_text_box(), D_d_to_u_col(), and D_d_to_u_row().
void D_get_u | ( | double | [2][2] | ) |
Definition at line 282 of file cnversions.c.
double D_get_u_east | ( | void | ) |
Definition at line 184 of file cnversions.c.
double D_get_u_north | ( | void | ) |
Definition at line 185 of file cnversions.c.
double D_get_u_south | ( | void | ) |
Definition at line 186 of file cnversions.c.
double D_get_u_to_a_xconv | ( | void | ) |
Definition at line 177 of file cnversions.c.
double D_get_u_to_a_yconv | ( | void | ) |
Definition at line 178 of file cnversions.c.
double D_get_u_to_d_xconv | ( | void | ) |
Definition at line 175 of file cnversions.c.
double D_get_u_to_d_yconv | ( | void | ) |
Definition at line 176 of file cnversions.c.
double D_get_u_west | ( | void | ) |
Definition at line 183 of file cnversions.c.
int D_is_lat_lon | ( | void | ) |
Definition at line 165 of file cnversions.c.
void D_move_abs | ( | double | , |
double | |||
) |
void D_move_rel | ( | double | , |
double | |||
) |
Definition at line 439 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 81 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 * | , |
const double * | , | ||
int | |||
) |
void D_polydots_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_polyline_abs | ( | const double * | , |
const double * | , | ||
int | |||
) |
void D_polyline_rel | ( | const double * | , |
const double * | , | ||
int | |||
) |
void D_pos_abs | ( | double | , |
double | |||
) |
Definition at line 218 of file draw2.c.
Referenced by D_pos_rel().
void D_pos_rel | ( | double | , |
double | |||
) |
Definition at line 229 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 152 of file display/raster.c.
References D_get_a().
void D_raster_draw_end | ( | void | ) |
Finish raster rendering.
Definition at line 231 of file display/raster.c.
References COM_end_raster().
void D_RGB_color | ( | int | , |
int | , | ||
int | |||
) |
Definition at line 214 of file tran_colr.c.
References COM_Color_RGB().
int D_save_command | ( | const char * | cmd | ) |
Append command to the cmd file (unused)
Definition at line 179 of file r_raster.c.
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 300 of file r_raster.c.
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 360 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_setup(), 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 377 of file r_raster.c.
References COM_Set_window().
Referenced by D_setup(), D_setup2(), and D_setup_unity().
void D_set_dst | ( | double | , |
double | , | ||
double | , | ||
double | |||
) |
Definition at line 251 of file cnversions.c.
Referenced by D_setup2(), and D_setup_unity().
void D_set_grid | ( | int | , |
int | , | ||
int | , | ||
int | |||
) |
Definition at line 234 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 50 of file raster2.c.
References D__overlay_mode.
void D_set_region | ( | const struct Cell_head * | ) |
Definition at line 198 of file cnversions.c.
void D_set_src | ( | double | , |
double | , | ||
double | , | ||
double | |||
) |
Definition at line 205 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.
References D_do_conversions(), D_erase(), D_get_frame(), D_set_clip_window_to_map_window(), D_set_clip_window_to_screen_window(), DEFAULT_BG_COLOR, G_get_set_window(), and Rast_set_window().
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(), and DEFAULT_BG_COLOR.
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 110 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 221 of file r_raster.c.
References COM_Text().
void D_text_rotation | ( | double | rotation | ) |
Set text rotation.
rotation | value |
Definition at line 208 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 198 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 126 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 494 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 478 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 462 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 446 of file cnversions.c.
void D_update_conversions | ( | void | ) |
Definition at line 93 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 143 of file tran_colr.c.
References COM_Standard_color(), and G_num_standard_colors().
Referenced by D_erase().