1 #include <grass/config.h>
13 #include <grass/gis.h>
14 #include <grass/raster.h>
15 #include <grass/graphics.h>
32 _send_ident(SCREEN_LEFT);
50 _send_ident(SCREEN_RITE);
69 _send_ident(SCREEN_BOT);
88 _send_ident(SCREEN_TOP);
95 _send_ident(GET_NUM_COLORS);
112 _send_ident(STANDARD_COLOR);
129 void REM_RGB_color(
unsigned char red,
unsigned char grn,
unsigned char blu)
131 _send_ident(RGB_COLOR);
147 _send_ident(LINE_WIDTH);
176 _send_ident(MOVE_ABS);
197 _send_ident(MOVE_REL);
215 _send_ident(CONT_ABS);
238 _send_ident(CONT_REL);
257 _send_ident(POLYDOTS_ABS);
259 _send_int_array(number, xarray);
260 _send_int_array(number, yarray);
279 _send_ident(POLYDOTS_REL);
281 _send_int_array(number, xarray);
282 _send_int_array(number, yarray);
302 _send_ident(POLYLINE_ABS);
304 _send_int_array(number, xarray);
305 _send_int_array(number, yarray);
326 _send_ident(POLYLINE_REL);
328 _send_int_array(number, xarray);
329 _send_int_array(number, yarray);
346 _send_ident(POLYGON_ABS);
348 _send_int_array(number, xarray);
349 _send_int_array(number, yarray);
368 _send_ident(POLYGON_REL);
370 _send_int_array(number, xarray);
371 _send_int_array(number, yarray);
389 _send_ident(BOX_ABS);
410 _send_ident(BOX_REL);
426 _send_ident(TEXT_SIZE);
433 _send_ident(TEXT_ROTATION);
434 _send_float(&rotation);
451 _send_ident(SET_WINDOW);
470 _send_text(sometext);
491 _send_ident(GET_TEXT_BOX);
492 _send_text(sometext);
538 _send_ident(CHARSET);
542 static void font_list(
char ***list,
int *
count,
int op)
549 _get_int(&num_fonts);
551 fonts = G_malloc(num_fonts *
sizeof(
char *));
552 for (i = 0; i < num_fonts; i++)
553 fonts[i] =
G_store(_get_text_2());
561 font_list(list, count, FONT_LIST);
566 font_list(list, count, FONT_INFO);
571 close(creat(name, 0666));
573 _send_ident(PANEL_SAVE);
584 _send_ident(PANEL_RESTORE);
591 _send_ident(PANEL_DELETE);
600 _send_ident(BEGIN_SCALED_RASTER);
602 _send_int_array(4, &src[0][0]);
603 _send_int_array(4, &dst[0][0]);
607 const unsigned char *red,
const unsigned char *grn,
608 const unsigned char *blu,
const unsigned char *nul)
613 _send_ident(SCALED_RASTER);
616 _send_char_array(n, red);
617 _send_char_array(n, grn);
618 _send_char_array(n, blu);
619 _send_char_array(n, nul ? nul : red);
627 _send_ident(END_SCALED_RASTER);
630 void REM_bitmap(
int ncols,
int nrows,
int threshold,
const unsigned char *
buf)
635 _send_int(&threshold);
636 _send_char_array(ncols * nrows, buf);
void REM_standard_color(int index)
void REM_set_window(int t, int b, int l, int r)
void REM_polygon_abs(const int *xarray, const int *yarray, int number)
int REM_screen_left(void)
char * G_store(const char *s)
Copy string to allocated memory.
void REM_polyline_rel(const int *xarray, const int *yarray, int number)
void REM_get_num_colors(int *n)
void REM_line_width(int width)
void REM_font(const char *name)
void REM_text(const char *text)
void REM_cont_rel(int x, int y)
void REM_panel_restore(const char *name)
void REM_move_rel(int x, int y)
void REM_font_info(char ***list, int *count)
void REM_font_list(char ***list, int *count)
void REM_polyline_abs(const int *xarray, const int *yarray, int number)
void REM_RGB_color(unsigned char red, unsigned char grn, unsigned char blu)
void REM_begin_scaled_raster(int mask, int src[2][2], int dst[2][2])
void REM_cont_abs(int x, int y)
void REM_panel_delete(const char *name)
void REM_text_size(int width, int height)
void REM_move_abs(int x, int y)
void REM_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
void REM_box_rel(int x, int y)
int REM_screen_rite(void)
void REM_box_abs(int x1, int y1, int x2, int y2)
void REM_polydots_abs(const int *xarray, const int *yarray, int number)
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
void REM_charset(const char *name)
void REM_polygon_rel(const int *xarray, const int *yarray, int number)
void REM_end_scaled_raster(void)
void REM_text_rotation(float rotation)
void REM_polydots_rel(const int *xarray, const int *yarray, int number)
int REM_scaled_raster(int n, int row, const unsigned char *red, const unsigned char *grn, const unsigned char *blu, const unsigned char *nul)
void REM_get_text_box(const char *text, int *t, int *b, int *l, int *r)
void REM_panel_save(const char *name, int t, int b, int l, int r)