GRASS GIS 8 Programmer's Manual
8.2.2dev(2023)-3d2c704037
|
Display Library - Raster graphics subroutines. More...
#include <grass/config.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include <grass/display.h>
#include <grass/spawn.h>
#include "driver.h"
Go to the source code of this file.
Functions | |
const struct driver * | PNG_Driver (void) |
Initialize display driver. More... | |
const struct driver * | PS_Driver (void) |
const struct driver * | HTML_Driver (void) |
int | D_open_driver (void) |
Open display driver. More... | |
void | D_close_driver (void) |
Close display driver. More... | |
int | D_save_command (const char *cmd) |
Append command to the cmd file (unused) More... | |
void | D__erase (void) |
Erase display (internal use only) More... | |
void | D_text_size (double width, double height) |
Set text size (width and height) More... | |
void | D_text_rotation (double rotation) |
Set text rotation. More... | |
void | D_text (const char *text) |
Draw text. More... | |
void | D_font (const char *name) |
Choose font. More... | |
void | D_encoding (const char *name) |
Set encoding. More... | |
void | D_font_list (char ***list, int *count) |
Get font list. More... | |
void | D_font_info (char ***list, int *count) |
Get font info. More... | |
void | D_get_clip_window (double *t, double *b, double *l, double *r) |
get graphical clipping window More... | |
void | D_set_clip_window (double t, double b, double l, double r) |
set graphical clipping window More... | |
void | D_get_frame (double *t, double *b, double *l, double *r) |
get graphical window (frame) More... | |
void | D_get_screen (double *t, double *b, double *l, double *r) |
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... | |
Display Library - Raster graphics subroutines.
(C) 2001-2015 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file r_raster.c.
void D__erase | ( | void | ) |
Erase display (internal use only)
Definition at line 187 of file r_raster.c.
References COM_Erase().
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().
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_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_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_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_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.
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_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_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_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.
const struct driver* HTML_Driver | ( | void | ) |
Definition at line 20 of file htmldriver/driver.c.
const struct driver* PNG_Driver | ( | void | ) |
Initialize display driver.
Definition at line 21 of file pngdriver/driver.c.
const struct driver* PS_Driver | ( | void | ) |
Definition at line 22 of file psdriver/driver.c.
double b |
Definition at line 39 of file r_raster.c.
Referenced by Cdhc_durbins_exact(), Cdhc_shapiro_wilk_exp(), D_clip_to_map(), D_erase(), dig_x_intersect(), G_create_alt_env(), G_read_compressed(), G_remove_commas(), G_setup_plot(), GS_get_val_at_xy(), GS_write_ppm(), GS_write_zoom(), gsd_color_func(), gsd_getimage(), Gvl_get_color_for_value(), gvld_isosurf(), I_iclass_add_signature(), I_iclass_create_raster(), I_malloc(), I_realloc(), IL_interp_segments_2d_parallel(), im_buffer< T >::im_buffer(), make_all_statistics(), make_statistics(), PNG_Set_window(), RTreeInsertRectF(), and RTreeInsertRectM().
double l |
Definition at line 39 of file r_raster.c.
Referenced by D_clip_to_map(), D_erase(), G_new_ilist(), G_setup_plot(), gsd_getimage(), IL_resample_interp_segments_2d(), M__get_description_len(), PNG_Set_window(), Rast_get_cat(), Rast_is_reclassed_to(), RTreeReInsertNode(), S_read(), im_buffer< T >::sort(), Vect_line_intersection(), Vect_line_intersection2(), Vect_str_to_cat_list(), and Vedit_split_lines().
double r |
Definition at line 39 of file r_raster.c.
Referenced by ReplacementHeap< T, Compare >::addRun(), ReplacementHeapBlock< T, Compare >::addRun(), D_clip_to_map(), D_erase(), G_drand48(), G_lrand48(), G_mrand48(), G_setup_plot(), GS_get_val_at_xy(), GS_write_ppm(), GS_write_zoom(), gsd_color_func(), gsd_getimage(), Gvl_get_color_for_value(), gvld_isosurf(), I_iclass_add_signature(), IL_crstg(), N_callback_gwflow_2d(), PNG_Set_window(), psinv(), RTreeAllocRect(), RTreeNullRect(), RTreeRectVolume(), and im_buffer< T >::sort().
double t |
Definition at line 39 of file r_raster.c.
Referenced by Cdhc_dmax_exp(), D_clip_to_map(), D_erase(), DGL_DEL_NODE_INEDGE_FUNC(), DGL_DEL_NODE_OUTEDGE_FUNC(), dig_prune(), dig_Rd_spidx_head(), dig_read_cidx_head(), dig_Wr_spidx_head(), dig_write_cidx_head(), G_setup_plot(), G_srand48_auto(), GS_set_twist(), gsd_getimage(), kdtree_create(), Nviz_del_texture(), PNG_Set_window(), RayCvxPolyhedronInt(), sort_intersection_list(), and Vect_net_ttb_shortest_path().