GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-d6dec75dd4
|
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 UNUSED) |
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 186 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 163 of file r_raster.c.
References _, COM_Graph_close(), and G_warning().
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_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_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_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_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.
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_save_command | ( | const char *cmd | UNUSED | ) |
Append command to the cmd file (unused)
Definition at line 178 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 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_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.
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 21 of file psdriver/driver.c.
double b |
Definition at line 39 of file r_raster.c.
Referenced by Cairo_Color(), Cairo_Set_window(), Cdhc_durbins_exact(), Cdhc_shapiro_wilk_exp(), COM_Color_RGB(), COM_Get_text_box(), D_clip_to_map(), D_erase(), D_get_clip_window(), D_get_text_box(), D_set_clip(), dig_x_intersect(), G_create_alt_env(), G_math_cholesky_sband_substitution(), G_math_solver_sparse_gs(), G_math_solver_sparse_jacobi(), 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(), gsd_viewport(), gvl_file_set_slices_param(), Gvl_get_color_for_value(), gvld_isosurf(), I_free(), 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_color_rgb(), PNG_Set_window(), PS_Color(), PS_Set_window(), RTreeAddBranch(), RTreeInsertRectF(), RTreeInsertRectM(), RTreeReadBranch(), and RTreeWriteBranch().
double l |
Definition at line 39 of file r_raster.c.
Referenced by Cairo_Set_window(), COM_Get_text_box(), D_clip_to_map(), D_erase(), D_get_clip_window(), D_get_text_box(), D_set_clip(), G_new_ilist(), G_setup_plot(), gsd_getimage(), gsd_viewport(), gsdrape_get_allsegments(), IL_resample_interp_segments_2d(), interp_first_last(), M__get_description_len(), PNG_Set_window(), PS_Set_window(), Rast_get_cat(), Rast_is_reclassed_to(), RTreeReInsertNode(), S_read(), 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(), Cairo_Color(), Cairo_Set_window(), COM_Color_RGB(), COM_Get_text_box(), D_clip_to_map(), D_erase(), D_get_clip_window(), D_get_text_box(), D_set_clip(), 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(), gsd_viewport(), Gvl_get_color_for_value(), gvld_isosurf(), I_iclass_add_signature(), IL_crst(), IL_crstg(), N_callback_gwflow_2d(), PNG_color_rgb(), PNG_Set_window(), PS_Color(), PS_Set_window(), psinv(), Rast_fpreclass_clear(), Rast_fpreclass_get_ith_rule(), Rast_fpreclass_get_limits(), Rast_fpreclass_init(), Rast_fpreclass_nof_rules(), Rast_fpreclass_perform_dd(), Rast_fpreclass_perform_df(), Rast_fpreclass_perform_di(), Rast_fpreclass_perform_fd(), Rast_fpreclass_perform_ff(), Rast_fpreclass_perform_fi(), Rast_fpreclass_perform_id(), Rast_fpreclass_perform_if(), Rast_fpreclass_perform_ii(), Rast_fpreclass_reset(), Rast_fpreclass_set_domain(), Rast_fpreclass_set_range(), RTreeAllocRect(), RTreeDeleteRect(), RTreeFreeBoundary(), RTreeFreeRect(), RTreeInitRect(), RTreeInsertRect(), RTreeNodeCover(), RTreeNullRect(), RTreeRectMargin(), RTreeRectSphericalVolume(), RTreeRectSurfaceArea(), RTreeRectVolume(), RTreeSearch(), RTreeSearch2(), RTreeSetRect1D(), RTreeSetRect2D(), RTreeSetRect3D(), and RTreeSetRect4D().
double t |
Definition at line 39 of file r_raster.c.
Referenced by Cairo_Set_window(), Cdhc_dmax_exp(), COM_Get_text_box(), D_clip_to_map(), D_erase(), D_get_clip_window(), D_get_dst(), D_get_frame(), D_get_grid(), D_get_screen(), D_get_src(), D_get_text_box(), D_set_clip(), D_set_clip_window(), db__recv_datetime(), db__send_datetime(), DGL_DEL_NODE_INEDGE_FUNC(), DGL_DEL_NODE_OUTEDGE_FUNC(), dig_prune(), dig_Rd_spidx_head(), dig_read_cidx_head(), dig_set_distance_to_line_tolerance(), dig_Wr_spidx_head(), dig_write_cidx_head(), G_set_distance_to_line_tolerance(), G_setup_plot(), G_srand48_auto(), gsd_getimage(), gsd_viewport(), kdtree_clear(), kdtree_create(), kdtree_destroy(), Nviz_del_texture(), PNG_Set_window(), PS_Set_window(), Rast3d_extern_length(), Rast3d_length(), RayCvxPolyhedronInt(), RTreeAddBranch(), RTreeAddNodePos(), RTreeAllocBoundary(), RTreeAllocNode(), RTreeAllocRect(), RTreeCombineRect(), RTreeCopyBranch(), RTreeCopyNode(), RTreeDeleteRect(), RTreeDestroyTree(), RTreeDisconnectBranch(), RTreeExpandRect(), RTreeFlushBuffer(), RTreeGetLeafMax(), RTreeGetNode(), RTreeGetNodeMax(), RTreeGetNodePos(), RTreeInitPVars(), RTreeInitRect(), RTreeInsertRect(), RTreeInsertRectF(), RTreeInsertRectM(), RTreeNodeChanged(), RTreeNodeCover(), RTreeNullRect(), RTreeReadBranch(), RTreeReadNode(), RTreeRectMargin(), RTreeRectSphericalVolume(), RTreeRectSurfaceArea(), RTreeRectVolume(), RTreeRewriteNode(), RTreeSearch(), RTreeSearch2(), RTreeSetOverflow(), RTreeSetRect1D(), RTreeSetRect2D(), RTreeSetRect3D(), RTreeSetRect4D(), RTreeWriteBranch(), RTreeWriteNode(), sort_intersection_list(), and Vect_net_ttb_shortest_path().