42 static void init(
void)
44 const char *fenc =
getenv(
"GRASS_ENCODING");
45 const char *font =
getenv(
"GRASS_FONT");
46 const char *line_width =
getenv(
"GRASS_RENDER_LINE_WIDTH");
47 const char *text_size =
getenv(
"GRASS_RENDER_TEXT_SIZE");
48 const char *frame_str =
getenv(
"GRASS_RENDER_FRAME");
50 D_font(font ? font :
"romans");
59 double s = atof(text_size);
67 sscanf(frame_str,
"%lf,%lf,%lf,%lf", &frame.t, &frame.b, &frame.l, &frame.r);
83 const char *p, *c, *m;
87 p =
getenv(
"GRASS_RENDER_IMMEDIATE");
88 c =
getenv(
"GRASS_RENDER_COMMAND");
99 "%s will be ignored."),
100 "GRASS_RENDER_COMMAND",
"MONITOR",
106 sprintf(progname,
"%s", c);
111 strcat(element,
"/");
112 strcat(element,
"MONITORS");
113 strcat(element,
"/");
118 G_debug(1,
"rendering redirected to %s", progname);
132 "(used for direct rendering) defined"),
133 "MONITOR",
"GRASS_RENDER_IMMEDIATE");
150 G_warning(
_(
"Unknown display driver <%s>"), p);
166 const char *cmd =
getenv(
"GRASS_NOTIFY");
302 if (t < frame.t) t = frame.t;
303 if (b > frame.b) b = frame.b;
304 if (l < frame.l) l = frame.l;
305 if (r > frame.r) r = frame.r;
void COM_Line_width(double)
void D_get_frame(double *t, double *b, double *l, double *r)
get graphical window (frame)
char * G_file_name(char *, const char *, const char *, const char *)
Builds full path names to GIS data files.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void D_font(const char *name)
Choose font.
void D_font_list(char ***list, int *count)
Get font list.
void D_get_clip_window(double *t, double *b, double *l, double *r)
get graphical clipping window
void D__erase(void)
Erase display (internal use only)
double D_get_d_south(void)
void COM_Graph_close(void)
void COM_Set_window(double, double, double, double)
void D_font_info(char ***list, int *count)
Get font info.
void D_get_screen(double *t, double *b, double *l, double *r)
get screen bounds
void G_free(void *)
Free allocated memory.
void COM_Set_font(const char *)
void D_close_driver(void)
Close display driver.
void D_set_clip_window_to_map_window(void)
set graphical clipping window to map window
void G_temp_element(char *)
Populates element with a path string.
void D_encoding(const char *name)
Set encoding.
void LIB_init(const struct driver *drv)
Initialize display driver.
double D_get_d_east(void)
int G_spawn_ex(const char *command,...)
Spawn new process based on command.
void COM_Text(const char *)
const struct driver * PNG_Driver(void)
Initialize display driver.
void D_set_clip_window_to_screen_window(void)
set clipping window to screen window
void D_text_size(double width, double height)
Set text size (width and height)
char * G_recreate_command(void)
Creates command to run non-interactive.
void COM_Get_window(double *, double *, double *, double *)
int int G_strcasecmp(const char *, const char *)
String compare ignoring case (upper or lower)
void COM_Font_list(char ***, int *)
void COM_Set_encoding(const char *)
void COM_Text_rotation(double)
void COM_Text_size(double, double)
double D_get_d_north(void)
void COM_Font_info(char ***, int *)
void D_set_clip_window(double t, double b, double l, double r)
set graphical clipping window
const struct driver * Cairo_Driver(void)
Initialize display driver.
int D_open_driver(void)
Open display driver.
double D_get_d_west(void)
void D_text_rotation(double rotation)
Set text rotation.
const char * G_mapset(void)
Get current mapset name.
void G_warning(const char *,...) __attribute__((format(printf
const char * G_getenv_nofatal(const char *)
Get environment variable.
const struct driver * HTML_Driver(void)
const struct driver * PS_Driver(void)
int D_save_command(const char *cmd)
Append command to the cmd file (unused)
void void G_verbose_message(const char *,...) __attribute__((format(printf
int G_debug(int, const char *,...) __attribute__((format(printf
void D_text(const char *text)
Draw text.