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);