GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <string.h>
#include <grass/colors.h>
#include <grass/gis.h>
#include <grass/display.h>
#include <grass/raster.h>
Go to the source code of this file.
Functions | |
int | D_new_window (char *name, int t, int b, int l, int r) |
create new graphics frame More... | |
int | D_new_window_percent (char *name, float b, float t, float l, float r) |
create new graphics frame, with coordinates in percent More... | |
int | D_set_cur_wind (const char *name) |
set current graphics frame More... | |
int | D_get_cur_wind (char *name) |
identify current graphics frame More... | |
int | D_show_window (int color) |
outlines current frame More... | |
int | D_get_screen_window (int *t, int *b, int *l, int *r) |
retrieve current frame coordinates More... | |
int | D_check_map_window (struct Cell_head *wind) |
assign/retrieve current map region More... | |
int | D_reset_screen_window (int t, int b, int l, int r) |
resets current frame position More... | |
int | D_timestamp (void) |
give current time to frame More... | |
void | D_remove_window (void) |
remove a frame More... | |
void | D_erase_window (void) |
erase current frame More... | |
void | D_erase (const char *color) |
void | D_remove_windows (void) |
void | D_full_screen (void) |
int D_check_map_window | ( | struct Cell_head * | wind | ) |
assign/retrieve current map region
Graphics frames can have GRASS map regions associated with them. This routine passes the map region to the current graphics frame. If a GRASS region is already associated with the graphics frame, its information is copied into region for use by the calling module. Otherwise region is associated with the current graphics frame. Note this routine is called by D_setup.
region |
Definition at line 326 of file display/window.c.
References buff, count, err, G_adjust_Cell_head(), G_format_easting(), G_format_northing(), G_scan_easting(), G_scan_northing(), num, R_pad_freelist(), R_pad_get_item(), R_pad_set_item(), and sprintf().
Referenced by D_setup().
void D_erase | ( | const char * | color | ) |
Definition at line 482 of file display/window.c.
References b, D_clear_window(), D_get_screen_window(), D_parse_color(), D_raster_use_color(), D_set_erase_color(), l, r, and R_box_abs().
void D_erase_window | ( | void | ) |
erase current frame
Erases the frame on the screen using the currently selected color.
~ |
Definition at line 473 of file display/window.c.
References b, D_get_screen_window(), l, r, R_box_abs(), and R_flush().
void D_full_screen | ( | void | ) |
Definition at line 519 of file display/window.c.
References D_new_window_percent(), D_remove_windows(), D_set_cur_wind(), D_timestamp(), D_translate_color(), R_erase(), and R_standard_color().
int D_get_cur_wind | ( | char * | name | ) |
identify current graphics frame
Captures the name of the current frame in string name.
name |
Definition at line 224 of file display/window.c.
References count, R_pad_freelist(), R_pad_get_item(), R_pad_select(), and stat.
Referenced by D_set_cur_wind(), and D_setup().
retrieve current frame coordinates
Returns current frame's coordinates in the pointers top, bottom, left, and right.
top | |
bottom | |
left | |
right |
Definition at line 295 of file display/window.c.
References count, R_pad_freelist(), R_pad_get_item(), and stat.
Referenced by D_erase(), D_erase_window(), D_set_clip_window(), D_set_clip_window_to_screen_window(), D_set_cur_wind(), D_setup(), and D_show_window().
create new graphics frame
Creates a new frame name with coordinates top, bottom, left, and right. If name is the empty string '''' (i.e., *name = = 0), the routine returns a unique string in name.
name | |
top | |
bottom | |
left | |
right |
Definition at line 60 of file display/window.c.
References buff, D_show_window(), D_timestamp(), R_pad_create(), R_pad_delete(), R_pad_invent(), R_pad_perror(), R_pad_select(), R_pad_set_item(), R_set_window(), sprintf(), and stat.
Referenced by D_new_window_percent(), and D_setup().
int D_new_window_percent | ( | char * | name, |
float | b, | ||
float | t, | ||
float | l, | ||
float | r | ||
) |
create new graphics frame, with coordinates in percent
Creates a new frame name with coordinates top, bottom, left, and right as percentages of the screen size. If name is the empty string "" (i.e., *name == 0), the routine returns a unique string in name.
name | |
bottom | |
top | |
left | |
right |
Definition at line 118 of file display/window.c.
References D_new_window(), R_screen_bot(), R_screen_left(), R_screen_rite(), and R_screen_top().
Referenced by D_full_screen().
void D_remove_window | ( | void | ) |
remove a frame
Removes any trace of the current frame.
~ |
Definition at line 457 of file display/window.c.
References R_pad_delete(), R_pad_delete_item(), and R_pad_select().
void D_remove_windows | ( | void | ) |
Definition at line 501 of file display/window.c.
References R_pad_delete(), R_pad_delete_item(), R_pad_list(), and R_pad_select().
Referenced by D_full_screen().
resets current frame position
Re-establishes the screen position of a frame at the location specified by top, bottom, left, and right.
top | |
bottom | |
left | |
right |
Definition at line 387 of file display/window.c.
References buff, D_show_window(), D_translate_color(), R_pad_delete_item(), R_pad_set_item(), sprintf(), and stat.
int D_set_cur_wind | ( | const char * | name | ) |
set current graphics frame
Selects the frame name to be the current frame. The previous current frame (if there was one) is outlined in grey. The selected current frame is outlined in white.
name |
Definition at line 154 of file display/window.c.
References b, D_get_cur_wind(), D_get_screen_window(), D_show_window(), D_translate_color(), l, r, R_pad_delete_item(), R_pad_select(), R_pad_set_item(), R_set_window(), and stat.
Referenced by D_full_screen(), D_setup(), and ident_win().
outlines current frame
Outlines current frame in color. Appropriate colors are found in $GISBASE/src/D/libes/colors.h
color |
Definition at line 258 of file display/window.c.
References b, D_get_screen_window(), l, r, R_cont_abs(), R_flush(), R_move_abs(), R_set_window(), R_standard_color(), and stat.
Referenced by D_new_window(), D_reset_screen_window(), and D_set_cur_wind().
int D_timestamp | ( | void | ) |
give current time to frame
Timestamp the current frame. This is used primarily to identify which frames are on top of other, specified frames.
~ |
Definition at line 416 of file display/window.c.
References buff, count, R_pad_current(), R_pad_delete_item(), R_pad_freelist(), R_pad_get_item(), R_pad_select(), R_pad_set_item(), sprintf(), and stat.
Referenced by D_full_screen(), and D_new_window().