GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
driver/Box.c
Go to the documentation of this file.
1 #include "driver.h"
2 #include "driverlib.h"
3 
4 void COM_Box_abs(int x1, int y1, int x2, int y2)
5 {
6  int x[4], y[4];
7 
8  if (driver->Box_abs) {
9  (*driver->Box_abs) (x1, y1, x2, y2);
10  return;
11  }
12 
13  x[0] = x1;
14  y[0] = y1;
15  x[1] = x1;
16  y[1] = y2;
17  x[2] = x2;
18  y[2] = y2;
19  x[3] = x2;
20  y[3] = y1;
21 
22  COM_Polygon_abs(x, y, 4);
23 }
24 
25 void COM_Box_rel(int x, int y)
26 {
27  if (driver->Box_rel) {
28  (*driver->Box_rel) (x, y);
29  return;
30  }
31 
32  COM_Box_abs(cur_x, cur_y, cur_x + x, cur_y + y);
33 }
int cur_y
Definition: driver/init.c:38
void COM_Polygon_abs(const int *, const int *, int)
void(* Box_abs)(int, int, int, int)
Definition: driver.h:27
void(* Box_rel)(int, int)
Definition: driver.h:28
int y
Definition: plot.c:34
void COM_Box_abs(int x1, int y1, int x2, int y2)
Definition: driver/Box.c:4
void COM_Box_rel(int x, int y)
Definition: driver/Box.c:25
int cur_x
Definition: driver/init.c:37
Definition: driver.h:25