|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-56a9afeb9f
|
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. | |
| const struct driver * | PS_Driver (void) |
| const struct driver * | HTML_Driver (void) |
| int | D_open_driver (void) |
| Open display driver. | |
| void | D_close_driver (void) |
| Close display driver. | |
| int | D_save_command (const char *cmd) |
| Append command to the cmd file (unused) | |
| void | D__erase (void) |
| Erase display (internal use only) | |
| void | D_text_size (double width, double height) |
| Set text size (width and height) | |
| void | D_text_rotation (double rotation) |
| Set text rotation. | |
| void | D_text (const char *text) |
| Draw text. | |
| void | D_font (const char *name) |
| Choose font. | |
| void | D_encoding (const char *name) |
| Set encoding. | |
| void | D_font_list (char ***list, int *count) |
| Get font list. | |
| void | D_font_info (char ***list, int *count) |
| Get font info. | |
| void | D_get_clip_window (double *t, double *b, double *l, double *r) |
| get graphical clipping window | |
| void | D_set_clip_window (double t, double b, double l, double r) |
| set graphical clipping window | |
| void | D_get_frame (double *t, double *b, double *l, double *r) |
| get graphical window (frame) | |
| void | D_get_screen (double *t, double *b, double *l, double *r) |
| get screen bounds | |
| void | D_set_clip_window_to_map_window (void) |
| set graphical clipping window to map window | |
| void | D_set_clip_window_to_screen_window (void) |
| set clipping window to screen window | |
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.
Erase display (internal use only)
Definition at line 186 of file r_raster.c.
References COM_Erase().
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().
Set encoding.
| name | encoding name |
Definition at line 242 of file r_raster.c.
References COM_Set_encoding(), and 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.
Get font info.
| [out] | list | list of font info |
| [out] | count | of items in the list |
Definition at line 264 of file r_raster.c.
References COM_Font_info(), and count.
Get font list.
| [out] | list | list of font names |
| [out] | count | of items in the list |
Definition at line 253 of file r_raster.c.
References COM_Font_list(), and count.
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 280 of file r_raster.c.
References b, COM_Get_window(), l, r, and t.
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().
Open display driver.
Default display driver is Cairo, if not available PNG is used.
Definition at line 82 of file r_raster.c.
References _, Cairo_Driver(), G_debug(), G_fatal_error(), G_file_name(), G_free(), G_getenv_nofatal(), G_mapset(), G_recreate_command(), G_spawn_ex(), G_strcasecmp(), G_temp_element(), G_verbose_message(), G_warning(), GPATH_MAX, HTML_Driver(), init(), LIB_init(), AMI_STREAM< T >::name(), NULL, PNG_Driver(), and PS_Driver().
Append command to the cmd file (unused)
Definition at line 178 of file r_raster.c.
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 297 of file r_raster.c.
References b, COM_Set_window(), l, r, and t.
Referenced by D_set_clip_window_to_map_window().
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 358 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().
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 373 of file r_raster.c.
References COM_Set_window().
Referenced by D_setup(), D_setup2(), and D_setup_unity().
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().
Set text rotation.
| rotation | value |
Definition at line 207 of file r_raster.c.
References COM_Text_rotation().
Set text size (width and height)
| width | text pixel width |
| height | text pixel height |
Definition at line 197 of file r_raster.c.
References COM_Text_size().
Definition at line 20 of file htmldriver/driver.c.
References HTML_Begin(), HTML_Box(), HTML_Close(), HTML_Cont(), HTML_Fill(), HTML_Graph_close(), HTML_Graph_set(), HTML_Move(), HTML_Stroke(), HTML_Text(), AMI_STREAM< T >::name(), and NULL.
Referenced by D_open_driver().
Initialize display driver.
Definition at line 21 of file pngdriver/driver.c.
References AMI_STREAM< T >::name(), NULL, PNG_Begin(), PNG_begin_raster(), PNG_Box(), PNG_Close(), PNG_color_rgb(), PNG_Cont(), PNG_draw_bitmap(), PNG_Erase(), PNG_Fill(), PNG_Graph_close(), PNG_Graph_get_file(), PNG_Graph_set(), PNG_Line_width(), PNG_Move(), PNG_Point(), PNG_raster(), PNG_Set_window(), and PNG_Stroke().
Referenced by D_open_driver().
Definition at line 21 of file psdriver/driver.c.
References AMI_STREAM< T >::name(), NULL, PS_Begin(), PS_begin_raster(), PS_Bitmap(), PS_Box(), PS_Close(), PS_Color(), PS_Cont(), PS_end_raster(), PS_Erase(), PS_Fill(), PS_Graph_close(), PS_Graph_get_file(), PS_Graph_set(), PS_Line_width(), PS_Move(), PS_Point(), PS_raster(), PS_Set_window(), and PS_Stroke().
Referenced by D_open_driver().
| double b |
Definition at line 39 of file r_raster.c.
Referenced by almost_equal(), AS_class_discont(), AS_eqdrt(), Cairo_Color(), Cairo_raster(), cairo_read_ppm(), Cairo_Set_window(), Cairo_text_box(), cairo_write_ppm(), Cdhc_durbins_exact(), Cdhc_ppnd7(), Cdhc_shapiro_wilk_exp(), cmattr(), cmcpy(), cmmul(), cmmult(), cmp_wnd(), COM_Color_RGB(), COM_Get_text_box(), compare(), create_raster(), csolv(), D_clip_to_map(), D_color_number_to_RGB(), D_color_of_type(), D_do_conversions(), 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(), D_set_dst(), D_set_grid(), D_set_src(), datetime_difference(), datetime_is_between(), db__recv_string_array(), db_nocase_compare(), db_strip(), dig__frealloc(), dig_x_intersect(), edge_order(), G_3dview_warning(), G_color_to_str(), G_create_alt_env(), G_lubksb(), G_math_backward_substitution(), G_math_cholesky_sband_substitution(), G_math_d_aAx_by(), G_math_d_ax_by(), G_math_f_aAx_by(), G_math_f_ax_by(), G_math_forward_substitution(), G_math_gauss_elimination(), G_math_i_ax_by(), G_math_solv(), G_math_solver_bicgstab(), G_math_solver_cg(), G_math_solver_cg_sband(), G_math_solver_cholesky(), G_math_solver_cholesky_sband(), G_math_solver_cholesky_sband_invert(), G_math_solver_gauss(), G_math_solver_gs(), G_math_solver_jacobi(), G_math_solver_lu(), G_math_solver_pcg(), G_math_solver_pcg_sband(), G_math_solver_sparse_bicgstab(), G_math_solver_sparse_cg(), G_math_solver_sparse_gs(), G_math_solver_sparse_jacobi(), G_math_solver_sparse_pcg(), G_math_solvps(), G_math_solvru(), G_math_solvtd(), G_matvect_product(), G_read_compressed(), G_remove_commas(), G_rgb_to_hsv(), G_setup_plot(), G_strip(), Gs_build_256lookup(), gs_get_databounds_planes(), GS_get_val_at_xy(), gs_los_intersect(), gs_los_intersect1(), Gs_pack_colors(), Gs_pack_colors_float(), gs_put_label(), GS_write_ppm(), GS_write_zoom(), GS_zoom_setup(), gsd_color_func(), gsd_getimage(), gsd_viewport(), gvl_file_set_slices_param(), Gvl_get_color_for_value(), GVL_get_region(), gvld_isosurf(), I_alloc_double2(), I_alloc_double3(), I_alloc_int2(), I_free(), I_iclass_add_signature(), I_iclass_create_raster(), I_malloc(), I_realloc(), IL_check_at_points_2d(), IL_check_at_points_2d_cvdev(), IL_crst(), IL_grid_calc_2d(), IL_interp_segments_2d(), IL_interp_segments_2d_parallel(), IL_resample_interp_segments_2d(), im_buffer< T >::im_buffer(), json_value_equals(), link__set_next(), make_all_statistics(), make_statistics(), mattr(), mc33_test_interior(), mcopy(), mmul(), N_calc_arith_mean(), N_calc_geom_mean(), N_calc_harmonic_mean(), N_calc_quad_mean(), N_math_array_2d(), N_math_array_3d(), N_norm_array_2d(), N_norm_array_3d(), Nviz_set_light_bright(), Nviz_set_light_color(), otrma(), otrsm(), PNG_color_rgb(), PNG_draw_bitmap(), png_get_color(), png_get_pixel(), PNG_Set_window(), ppnd16(), pqheap_t1< T >::print_range(), BasicMinMaxHeap< T >::print_range(), PS_Color(), PS_Set_window(), qrbdi(), qrbdu1(), qrbdv(), Rast__lookup_colors(), Rast_get_color(), Rast_parse_color_rule(), Rast_print_colors(), Rast_print_json_colors(), Rast_read_color_rule(), Rast_read_color_rules(), Rast_set_c_color(), Rast_set_d_color(), Rast_sort_histogram(), read_bmp(), read_png(), read_ppm(), rmmult(), RTreeAddBranch(), RTreeInsertRectF(), RTreeInsertRectM(), RTreeReadBranch(), RTreeSplitNode(), RTreeWriteBranch(), S_read(), solv(), solvps(), solvru(), solvtd(), utrncm(), utrnhm(), V3Cross(), Vect__intersect_x_line_with_poly(), Vect__intersect_y_line_with_poly(), Vect_set_constraint_region(), Vect_tin_get_z(), write_bmp(), write_pgm(), write_png(), write_ppm(), yy_create_buffer(), yy_delete_buffer(), yy_flush_buffer(), yy_scan_buffer(), and yy_scan_bytes().
| double l |
Definition at line 39 of file r_raster.c.
Referenced by Cairo_Set_window(), Cairo_text_box(), cmmult(), COM_Get_text_box(), D_clip_to_map(), D_do_conversions(), 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(), D_set_dst(), D_set_grid(), D_set_src(), G_new_ilist(), G_setup_plot(), G_squeeze(), gs_put_label(), gsd_getimage(), gsd_viewport(), gsdrape_get_allsegments(), gsdrape_get_segments(), IL_grid_calc_2d(), IL_matrix_create_alloc(), IL_resample_interp_segments_2d(), interp_first_last(), M__get_description_len(), PNG_Set_window(), PS_Set_window(), quad_get_points(), Rast_get_cat(), Rast_is_reclassed_to(), read_slice(), rmmult(), RTreeReInsertNode(), S_read(), stroke_chain(), Vect_line_intersection(), Vect_line_intersection2(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), 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(), avl_delete(), avl_replace(), Cairo_Color(), Cairo_raster(), cairo_read_ppm(), Cairo_Set_window(), Cairo_text_box(), cairo_write_ppm(), Cdhc_kuipers_v_exp(), Cdhc_ppnd7(), COM_Color_RGB(), COM_Get_text_box(), create_raster(), D_clip_to_map(), D_color_number_to_RGB(), D_color_of_type(), D_do_conversions(), 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(), D_set_dst(), D_set_grid(), D_set_src(), evmax(), G_begin_zone_area_on_sphere(), G_color_to_str(), G_drand48(), G_lrand48(), G_mrand48(), G_rgb_to_hsv(), G_setup_plot(), Gs_build_256lookup(), GS_get_val_at_xy(), Gs_pack_colors(), Gs_pack_colors_float(), gs_put_label(), GS_write_ppm(), GS_write_zoom(), gsd_color_func(), gsd_getimage(), gsd_viewport(), Gvl_get_color_for_value(), gvld_isosurf(), gvld_slice(), I_iclass_add_signature(), IL_check_at_points_2d(), IL_check_at_points_2d_cvdev(), IL_crst(), IL_crstg(), IL_grid_calc_2d(), IL_matrix_create_alloc(), IL_resample_interp_segments_2d(), kdtree_remove(), N_callback_gwflow_2d(), N_callback_gwflow_3d(), new_arc(), Nviz_set_light_bright(), Nviz_set_light_color(), PNG_color_rgb(), PNG_draw_bitmap(), png_get_color(), png_get_pixel(), PNG_Set_window(), ppnd16(), PS_Color(), PS_Set_window(), psinv(), quad_add_data(), Rast3d_get_volume_a(), Rast__lookup_colors(), Rast_fpreclass_add_rule(), Rast_fpreclass_clear(), Rast_fpreclass_get_cell_value(), Rast_fpreclass_get_ith_rule(), Rast_fpreclass_get_limits(), Rast_fpreclass_get_neg_infinite_rule(), Rast_fpreclass_get_pos_infinite_rule(), 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_reverse_rule_order(), Rast_fpreclass_set_domain(), Rast_fpreclass_set_neg_infinite_rule(), Rast_fpreclass_set_pos_infinite_rule(), Rast_fpreclass_set_range(), Rast_get_color(), Rast_parse_color_rule(), Rast_print_colors(), Rast_print_json_colors(), Rast_read_color_rule(), Rast_read_color_rules(), Rast_set_c_color(), Rast_set_d_color(), read_bmp(), read_png(), read_ppm(), rtree_search(), RTreeAllocRect(), RTreeCompareRect(), RTreeContained(), RTreeContains(), RTreeDeleteRect(), RTreeDeleteRectF(), RTreeDeleteRectM(), RTreeFreeBoundary(), RTreeFreeRect(), RTreeInitRect(), RTreeInsertRect(), RTreeInsertRectF(), RTreeInsertRectM(), RTreeNodeCover(), RTreeNullRect(), RTreeOverlap(), RTreePickBranch(), RTreePrintRect(), RTreeRectMargin(), RTreeRectSphericalVolume(), RTreeRectSurfaceArea(), RTreeRectVolume(), RTreeSearch(), RTreeSearch2(), RTreeSearchF(), RTreeSearchM(), RTreeSetRect1D(), RTreeSetRect2D(), RTreeSetRect3D(), RTreeSetRect4D(), ruinv(), S_read(), slice_calc(), smgen(), solvps(), stroke_chain(), sv2u1v(), sv2uv(), svdu1v(), svduv(), tavl_delete(), tavl_replace(), unitary(), write_bmp(), write_pgm(), write_png(), and write_ppm().
| double t |
Definition at line 39 of file r_raster.c.
Referenced by add_ipoint(), Cairo_Set_window(), Cairo_text_box(), Cdhc_dagostino_d(), Cdhc_dmax_exp(), cminv(), COM_Get_text_box(), correct_twist(), csolv(), D_clip_to_map(), D_do_conversions(), 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(), D_set_dst(), D_set_grid(), D_set_src(), db__recv_datetime(), db__recv_table_definition(), db__send_datetime(), db_nocase_compare(), DGL_DEL_NODE_INEDGE_FUNC(), DGL_DEL_NODE_OUTEDGE_FUNC(), dig_distance2_point_to_line(), dig_find_intersection(), dig_prune(), dig_Rd_spidx_head(), dig_read_cidx_head(), dig_set_distance_to_line_tolerance(), dig_test_for_intersection(), dig_Wr_spidx_head(), dig_write_cidx_head(), evmax(), find_all_intersections(), G_chop(), G_distance2_point_to_line(), G_distance_point_to_line_segment(), G_geodesic_distance_lon_to_lon(), G_read_datum_table(), G_scan_timestamp(), G_set_distance_to_line_tolerance(), G_setup_plot(), G_squeeze(), G_srand48_auto(), get_epsilon(), gk_make_framesfromkeys(), gs_get_databounds_planes(), gs_put_label(), GS_set_twist(), gsd_getimage(), gsd_viewport(), GVL_get_region(), hevmax(), kdtree_clear(), kdtree_create(), kdtree_destroy(), kdtree_dnn(), kdtree_insert(), kdtree_knn(), kdtree_optimize(), kdtree_remove(), kdtree_rnn(), mc33_test_interior(), minv(), Nviz_del_texture(), otrma(), otrsm(), pg_create(), PNG_Set_window(), PS_Set_window(), psinv(), qrbdi(), qrbdu1(), qrbdv(), Rast3d_extern_length(), Rast3d_get_volume_a(), Rast3d_length(), RayCvxPolyhedronInt(), rbtree_insert(), rtree_search(), RTreeAddBranch(), RTreeAddNodePos(), RTreeAllocBoundary(), RTreeAllocNode(), RTreeAllocRect(), RTreeCombineRect(), RTreeCompareRect(), RTreeContained(), RTreeContains(), RTreeCopyBranch(), RTreeCopyNode(), RTreeDeleteRect(), RTreeDeleteRectF(), RTreeDeleteRectM(), RTreeDestroyTree(), RTreeDisconnectBranch(), RTreeExpandRect(), RTreeFlushBuffer(), RTreeGetLeafMax(), RTreeGetNode(), RTreeGetNodeMax(), RTreeGetNodePos(), RTreeInitNode(), RTreeInitPVars(), RTreeInitRect(), RTreeInsertRect(), RTreeInsertRectF(), RTreeInsertRectM(), RTreeNodeChanged(), RTreeNodeCover(), RTreeNullRect(), RTreeOverlap(), RTreePickBranch(), RTreePrintNode(), RTreePrintRect(), RTreeReadBranch(), RTreeReadNode(), RTreeRectMargin(), RTreeRectSphericalVolume(), RTreeRectSurfaceArea(), RTreeRectVolume(), RTreeRewriteNode(), RTreeSearch(), RTreeSearch2(), RTreeSearchF(), RTreeSearchM(), RTreeSetLeafMax(), RTreeSetNodeMax(), RTreeSetOverflow(), RTreeSetRect1D(), RTreeSetRect2D(), RTreeSetRect3D(), RTreeSetRect4D(), RTreeSplitNode(), RTreeWriteBranch(), RTreeWriteNode(), ruinv(), segment_intersection_2d_tol(), smgen(), solv(), solvps(), solvru(), sort_intersection_list(), sv2u1v(), sv2uv(), svdu1v(), svduv(), tavl_delete(), utrncm(), utrnhm(), Vect_net_ttb_build_graph(), Vect_net_ttb_shortest_path(), Vect_segment_intersection(), and Vect_set_constraint_region().