38 #include <grass/colors.h>
39 #include <grass/gis.h>
40 #include <grass/display.h>
41 #include <grass/raster.h>
82 sprintf(buff,
"%d %d %d %d", t, b, l, r);
95 sprintf(buff,
"window <%s>, item <%s>", name,
"d_win");
125 int win_t = 0.5 + scr_t + (scr_b - scr_t) * (100. - t) / 100.0;
126 int win_b = 0.5 + scr_t + (scr_b - scr_t) * (100. - b) / 100.0;
127 int win_l = 0.5 + scr_l + (scr_r - scr_l) * l / 100.0;
128 int win_r = 0.5 + scr_l + (scr_r - scr_l) * r / 100.0;
173 if (strlen(pad_cur)) {
174 not_same_window = strcmp(name, pad_cur);
175 if (not_same_window) {
184 if (not_same_window) {
238 strcpy(name, list[0]);
304 sscanf(list[0],
"%d %d %d %d", t, b, l, r);
329 char ebuf[64], nbuf[64], sbuf[64], wbuf[64];
340 sprintf(buff,
"%d %d %s %s %s %s %d %d",
341 wind->proj, wind->zone,
342 ebuf, wbuf, nbuf, sbuf, wind->rows, wind->cols);
348 num = sscanf(list[0],
"%d %d %s %s %s %s %d %d",
349 &wind->proj, &wind->zone,
350 ebuf, wbuf, nbuf, sbuf, &wind->rows, &wind->cols);
394 sprintf(buff,
"%d %d %d %d", t, b, l, r);
435 sscanf(list[0],
"%d", &cur_time);
436 sprintf(buff,
"%d", cur_time + 1);
513 for (i = 0; i < npads; i++) {
void R_flush(void)
flush graphics
void D_erase(const char *color)
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
int D_set_cur_wind(const char *name)
set current graphics frame
int R_screen_bot(void)
bottom of screen
int R_pad_list(char ***list, int *count)
void R_box_abs(int x1, int y1, int x2, int y2)
fill a box
int D_check_map_window(struct Cell_head *wind)
assign/retrieve current map region
int D_reset_screen_window(int t, int b, int l, int r)
resets current frame position
void R_pad_perror(const char *msg, int code)
void D_erase_window(void)
erase current frame
int D_new_window_percent(char *name, float b, float t, float l, float r)
create new graphics frame, with coordinates in percent
void R_standard_color(int index)
select standard color
int D_get_cur_wind(char *name)
identify current graphics frame
int R_pad_set_item(const char *name, const char *value)
void D_remove_window(void)
remove a frame
int D_clear_window(void)
clears information about current frame
void R_erase(void)
erase screen
int R_screen_rite(void)
screen right edge
int R_pad_current(char *name)
int D_raster_use_color(int color)
draw with a color from D_parse_color
void R_cont_abs(int x, int y)
draw line
int D_set_erase_color(const char *colorname)
int R_screen_left(void)
screen left edge
void R_move_abs(int x, int y)
move current location
int R_screen_top(void)
top of screen
int R_pad_delete_item(const char *name)
int R_pad_select(const char *pad)
char * G_adjust_Cell_head(struct Cell_head *cellhd, int row_flag, int col_flag)
Adjust cell header.
int D_new_window(char *name, int t, int b, int l, int r)
create new graphics frame
void D_remove_windows(void)
int D_show_window(int color)
outlines current frame
int D_translate_color(const char *str)
color name to number
int G_scan_northing(const char *buf, double *northing, int projection)
ASCII northing to double.
void R_pad_freelist(char **list, int count)
int D_get_screen_window(int *t, int *b, int *l, int *r)
retrieve current frame coordinates
int R_pad_invent(char *pad)
void R_set_window(int t, int b, int l, int r)
set text clipping frame
int R_pad_create(const char *pad)
int D_timestamp(void)
give current time to frame
int G_scan_easting(const char *buf, double *easting, int projection)
ASCII easting to double.
int R_pad_get_item(const char *name, char ***list, int *count)
int D_parse_color(const char *str, int none_acceptable)
color option text to usable color number