GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
com_proto.c
Go to the documentation of this file.
1 
2 #include <stdio.h>
3 
4 #include <sys/types.h>
5 #include <sys/stat.h>
6 #include <fcntl.h>
7 #include <unistd.h>
8 
9 #include <grass/gis.h>
10 #include <grass/raster.h>
11 #include <grass/graphics.h>
12 
13 #include "transport.h"
14 
24 int R_screen_left(void)
25 {
26  return trans->screen_left();
27 }
28 
38 int R_screen_rite(void)
39 {
40  return trans->screen_rite();
41 }
42 
52 int R_screen_bot(void)
53 {
54  return trans->screen_bot();
55 }
56 
57 
67 int R_screen_top(void)
68 {
69  return trans->screen_top();
70 }
71 
72 void R_get_num_colors(int *n)
73 {
75 }
76 
77 
90 void R_standard_color(int index)
91 {
92  trans->standard_color(index);
93 }
94 
109 void R_RGB_color(unsigned char red, unsigned char grn, unsigned char blu)
110 {
111  trans->RGB_color(red, grn, blu);
112 }
113 
124 {
125  trans->line_width(width);
126 }
127 
137 void R_erase(void)
138 {
139  trans->erase();
140 }
141 
153 void R_move_abs(int x, int y)
154 {
155  trans->move_abs(x, y);
156 }
157 
173 void R_move_rel(int x, int y)
174 {
175  trans->move_rel(x, y);
176 }
177 
190 void R_cont_abs(int x, int y)
191 {
192  trans->cont_abs(x, y);
193 }
194 
212 void R_cont_rel(int x, int y)
213 {
214  trans->cont_rel(x, y);
215 }
216 
230 void R_polydots_abs(const int *xarray, const int *yarray, int number)
231 {
232  trans->polydots_abs(xarray, yarray, number);
233 }
234 
250 void R_polydots_rel(const int *xarray, const int *yarray, int number)
251 {
252  trans->polydots_rel(xarray, yarray, number);
253 }
254 
271 void R_polyline_abs(const int *xarray, const int *yarray, int number)
272 {
273  trans->polyline_abs(xarray, yarray, number);
274 }
275 
293 void R_polyline_rel(const int *xarray, const int *yarray, int number)
294 {
295  trans->polyline_rel(xarray, yarray, number);
296 }
297 
311 void R_polygon_abs(const int *xarray, const int *yarray, int number)
312 {
313  trans->polygon_abs(xarray, yarray, number);
314 }
315 
331 void R_polygon_rel(const int *xarray, const int *yarray, int number)
332 {
333  trans->polygon_rel(xarray, yarray, number);
334 }
335 
350 void R_box_abs(int x1, int y1, int x2, int y2)
351 {
352  trans->box_abs(x1, y1, x2, y2);
353 }
354 
355 
368 void R_box_rel(int x, int y)
369 {
370  trans->box_rel(x, y);
371 }
372 
383 void R_text_size(int width, int height)
384 {
385  trans->text_size(width, height);
386 }
387 
388 void R_text_rotation(float rotation)
389 {
390  trans->text_rotation(rotation);
391 }
392 
406 void R_set_window(int t, int b, int l, int r)
407 {
408  trans->set_window(t, b, l, r);
409 }
410 
421 void R_text(const char *text)
422 {
423  trans->text(text);
424 }
425 
443 void R_get_text_box(const char *text, int *t, int *b, int *l, int *r)
444 {
445  trans->get_text_box(text, t, b, l, r);
446 }
447 
480 void R_font(const char *name)
481 {
482  trans->font(name);
483 }
484 
485 void R_charset(const char *name)
486 {
487  trans->charset(name);
488 }
489 
490 void R_font_list(char ***list, int *count)
491 {
492  trans->font_list(list, count);
493 }
494 
495 void R_font_info(char ***list, int *count)
496 {
497  trans->font_info(list, count);
498 }
499 
500 void R_panel_save(const char *name, int t, int b, int l, int r)
501 {
502  trans->panel_save(name, t, b, l, r);
503 }
504 
505 void R_panel_restore(const char *name)
506 {
507  trans->panel_restore(name);
508 }
509 
510 void R_panel_delete(const char *name)
511 {
512  trans->panel_delete(name);
513 }
514 
515 void R_begin_scaled_raster(int mask, int src[2][2], int dst[2][2])
516 {
517  trans->begin_scaled_raster(mask, src, dst);
518 }
519 
520 int R_scaled_raster(int n, int row,
521  const unsigned char *red, const unsigned char *grn,
522  const unsigned char *blu, const unsigned char *nul)
523 {
524  return trans->scaled_raster(n, row, red, grn, blu, nul);
525 }
526 
528 {
530 }
531 
532 void R_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
533 {
534  trans->bitmap(ncols, nrows, threshold, buf);
535 }
void R_polygon_abs(const int *xarray, const int *yarray, int number)
draw a closed polygon
Definition: com_proto.c:311
void R_panel_save(const char *name, int t, int b, int l, int r)
Definition: com_proto.c:500
void R_panel_restore(const char *name)
Definition: com_proto.c:505
void(* move_abs)(int, int)
Definition: transport.h:165
int l
Definition: dataquad.c:292
float b
Definition: named_colr.c:8
int R_screen_bot(void)
bottom of screen
Definition: com_proto.c:52
void(* standard_color)(int)
Definition: transport.h:161
void(* polyline_abs)(const int *, const int *, int)
Definition: transport.h:171
void(* font)(const char *)
Definition: transport.h:182
void R_box_abs(int x1, int y1, int x2, int y2)
fill a box
Definition: com_proto.c:350
int(* screen_rite)(void)
Definition: transport.h:157
void R_line_width(int width)
change the width of line
Definition: com_proto.c:123
string name
Definition: render.py:1314
void(* panel_delete)(const char *)
Definition: transport.h:188
float r
Definition: named_colr.c:8
void R_font_list(char ***list, int *count)
Definition: com_proto.c:490
void(* bitmap)(int, int, int, const unsigned char *)
Definition: transport.h:194
struct transport * trans
Definition: com_io.c:143
tuple width
int count
void R_standard_color(int index)
select standard color
Definition: com_proto.c:90
void(* polydots_rel)(const int *, const int *, int)
Definition: transport.h:170
void R_box_rel(int x, int y)
fill a box
Definition: com_proto.c:368
void(* polydots_abs)(const int *, const int *, int)
Definition: transport.h:169
void(* line_width)(int)
Definition: transport.h:163
void R_polydots_rel(const int *xarray, const int *yarray, int number)
draw a series of dots
Definition: com_proto.c:250
void R_panel_delete(const char *name)
Definition: com_proto.c:510
int y
Definition: plot.c:34
void(* erase)(void)
Definition: transport.h:164
void R_end_scaled_raster(void)
Definition: com_proto.c:527
void R_erase(void)
erase screen
Definition: com_proto.c:137
int(* screen_left)(void)
Definition: transport.h:156
void(* polygon_abs)(const int *, const int *, int)
Definition: transport.h:173
int R_screen_rite(void)
screen right edge
Definition: com_proto.c:38
void(* font_info)(char ***, int *)
Definition: transport.h:185
void R_text(const char *text)
write text
Definition: com_proto.c:421
void R_polyline_abs(const int *xarray, const int *yarray, int number)
draw an open polygon
Definition: com_proto.c:271
void R_charset(const char *name)
Definition: com_proto.c:485
void R_polyline_rel(const int *xarray, const int *yarray, int number)
draw an open polygon
Definition: com_proto.c:293
void R_move_rel(int x, int y)
move current location
Definition: com_proto.c:173
void(* polygon_rel)(const int *, const int *, int)
Definition: transport.h:174
void(* polyline_rel)(const int *, const int *, int)
Definition: transport.h:172
int R_scaled_raster(int n, int row, const unsigned char *red, const unsigned char *grn, const unsigned char *blu, const unsigned char *nul)
Definition: com_proto.c:520
void R_cont_abs(int x, int y)
draw line
Definition: com_proto.c:190
void R_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
Definition: com_proto.c:532
void(* text)(const char *)
Definition: transport.h:180
int R_screen_left(void)
screen left edge
Definition: com_proto.c:24
void R_move_abs(int x, int y)
move current location
Definition: com_proto.c:153
int R_screen_top(void)
top of screen
Definition: com_proto.c:67
void R_font(const char *name)
choose font
Definition: com_proto.c:480
void(* cont_abs)(int, int)
Definition: transport.h:167
void(* end_scaled_raster)(void)
Definition: transport.h:193
void R_text_size(int width, int height)
set text size
Definition: com_proto.c:383
int(* screen_top)(void)
Definition: transport.h:159
void(* panel_restore)(const char *)
Definition: transport.h:187
void(* move_rel)(int, int)
Definition: transport.h:166
void R_get_text_box(const char *text, int *t, int *b, int *l, int *r)
get text extents
Definition: com_proto.c:443
void(* begin_scaled_raster)(int, int[2][2], int[2][2])
Definition: transport.h:189
void R_polydots_abs(const int *xarray, const int *yarray, int number)
draw a series of dots
Definition: com_proto.c:230
void(* get_text_box)(const char *, int *, int *, int *, int *)
Definition: transport.h:181
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
Definition: g3drange.c:62
void(* box_abs)(int, int, int, int)
Definition: transport.h:175
void(* box_rel)(int, int)
Definition: transport.h:176
void(* text_rotation)(float)
Definition: transport.h:178
void R_begin_scaled_raster(int mask, int src[2][2], int dst[2][2])
Definition: com_proto.c:515
void(* charset)(const char *)
Definition: transport.h:183
void R_text_rotation(float rotation)
Definition: com_proto.c:388
void(* get_num_colors)(int *)
Definition: transport.h:160
void(* text_size)(int, int)
Definition: transport.h:177
void R_polygon_rel(const int *xarray, const int *yarray, int number)
draw a closed polygon
Definition: com_proto.c:331
void R_font_info(char ***list, int *count)
Definition: com_proto.c:495
int(* scaled_raster)(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition: transport.h:190
void(* cont_rel)(int, int)
Definition: transport.h:168
void R_set_window(int t, int b, int l, int r)
set text clipping frame
Definition: com_proto.c:406
int height
void R_RGB_color(unsigned char red, unsigned char grn, unsigned char blu)
select color
Definition: com_proto.c:109
void R_get_num_colors(int *n)
Definition: com_proto.c:72
void(* panel_save)(const char *, int, int, int, int)
Definition: transport.h:186
int n
Definition: dataquad.c:291
void(* font_list)(char ***, int *)
Definition: transport.h:184
void(* RGB_color)(unsigned char, unsigned char, unsigned char)
Definition: transport.h:162
void(* set_window)(int, int, int, int)
Definition: transport.h:179
int(* screen_bot)(void)
Definition: transport.h:158
void R_cont_rel(int x, int y)
draw line
Definition: com_proto.c:212