GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
loc_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 "driver.h"
14 #include "transport.h"
15 
25 int LOC_screen_left(void)
26 {
27  int l;
28 
29  COM_Screen_left(&l);
30 
31  return l;
32 }
33 
43 int LOC_screen_rite(void)
44 {
45  int r;
46 
47  COM_Screen_rite(&r);
48 
49  return r;
50 }
51 
61 int LOC_screen_bot(void)
62 {
63  int b;
64 
65  COM_Screen_bot(&b);
66 
67  return b;
68 }
69 
70 
80 int LOC_screen_top(void)
81 {
82  int t;
83 
84  COM_Screen_top(&t);
85 
86  return t;
87 }
88 
89 void LOC_get_num_colors(int *n)
90 {
92 }
93 
106 void LOC_standard_color(int index)
107 {
108  COM_Standard_color(index);
109 }
110 
125 void LOC_RGB_color(unsigned char red, unsigned char grn, unsigned char blu)
126 {
127  COM_Color_RGB(red, grn, blu);
128 }
129 
140 {
141  COM_Line_width(width);
142 }
143 
153 void LOC_erase(void)
154 {
155  COM_Erase();
156 }
157 
169 void LOC_move_abs(int x, int y)
170 {
171  COM_Move_abs(x, y);
172 }
173 
189 void LOC_move_rel(int x, int y)
190 {
191  COM_Move_rel(x, y);
192 }
193 
206 void LOC_cont_abs(int x, int y)
207 {
208  COM_Cont_abs(x, y);
209 }
210 
228 void LOC_cont_rel(int x, int y)
229 {
230  COM_Cont_rel(x, y);
231 }
232 
246 void LOC_polydots_abs(const int *xarray, const int *yarray, int number)
247 {
248  COM_Polydots_abs(xarray, yarray, number);
249 }
250 
266 void LOC_polydots_rel(const int *xarray, const int *yarray, int number)
267 {
268  COM_Polydots_rel(xarray, yarray, number);
269 }
270 
287 void LOC_polyline_abs(const int *xarray, const int *yarray, int number)
288 {
289  COM_Polyline_abs(xarray, yarray, number);
290 }
291 
309 void LOC_polyline_rel(const int *xarray, const int *yarray, int number)
310 {
311  COM_Polyline_rel(xarray, yarray, number);
312 }
313 
327 void LOC_polygon_abs(const int *xarray, const int *yarray, int number)
328 {
329  COM_Polygon_abs(xarray, yarray, number);
330 }
331 
347 void LOC_polygon_rel(const int *xarray, const int *yarray, int number)
348 {
349  COM_Polygon_rel(xarray, yarray, number);
350 }
351 
366 void LOC_box_abs(int x1, int y1, int x2, int y2)
367 {
368  COM_Box_abs(x1, y1, x2, y2);
369 }
370 
371 
384 void LOC_box_rel(int x, int y)
385 {
386  COM_Box_rel(x, y);
387 }
388 
399 void LOC_text_size(int width, int height)
400 {
401  COM_Text_size(width, height);
402 }
403 
404 void LOC_text_rotation(float rotation)
405 {
406  COM_Text_rotation(rotation);
407 }
408 
422 void LOC_set_window(int t, int b, int l, int r)
423 {
424  COM_Set_window(t, b, l, r);
425 }
426 
437 void LOC_text(const char *text)
438 {
439  COM_Text(text);
440 }
441 
459 void LOC_get_text_box(const char *text, int *t, int *b, int *l, int *r)
460 {
461  COM_Get_text_box(text, t, b, l, r);
462 }
463 
496 void LOC_font(const char *name)
497 {
498  COM_Font_get(name);
499 }
500 
501 void LOC_charset(const char *name)
502 {
503  COM_Font_init_charset(name);
504 }
505 
506 void LOC_font_list(char ***list, int *count)
507 {
508  COM_Font_list(list, count);
509 }
510 
511 void LOC_font_info(char ***list, int *count)
512 {
513  COM_Font_info(list, count);
514 }
515 
516 void LOC_panel_save(const char *name, int t, int b, int l, int r)
517 {
518  close(creat(name, 0666));
519 
520  COM_Panel_save(name, t, b, l, r);
521  R_stabilize();
522 }
523 
524 void LOC_panel_restore(const char *name)
525 {
526  COM_Panel_restore(name);
527  R_stabilize();
528 }
529 
530 void LOC_panel_delete(const char *name)
531 {
532  COM_Panel_delete(name);
533  R_stabilize();
534 
535  remove(name);
536 }
537 
538 void LOC_begin_scaled_raster(int mask, int src[2][2], int dst[2][2])
539 {
540  COM_begin_scaled_raster(mask, src, dst);
541 }
542 
543 int LOC_scaled_raster(int n, int row,
544  const unsigned char *red, const unsigned char *grn,
545  const unsigned char *blu, const unsigned char *nul)
546 {
547  return COM_scaled_raster(n, row, red, grn, blu, nul);
548 }
549 
551 {
553 }
554 
555 void LOC_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
556 {
557  COM_Bitmap(ncols, nrows, threshold, buf);
558 }