GRASS Programmer's Manual  6.4.2(2012)
driver/Box.c
Go to the documentation of this file.
00001 #include "driver.h"
00002 #include "driverlib.h"
00003 
00004 void COM_Box_abs(int x1, int y1, int x2, int y2)
00005 {
00006     int x[4], y[4];
00007 
00008     if (driver->Box_abs) {
00009         (*driver->Box_abs) (x1, y1, x2, y2);
00010         return;
00011     }
00012 
00013     x[0] = x1;
00014     y[0] = y1;
00015     x[1] = x1;
00016     y[1] = y2;
00017     x[2] = x2;
00018     y[2] = y2;
00019     x[3] = x2;
00020     y[3] = y1;
00021 
00022     COM_Polygon_abs(x, y, 4);
00023 }
00024 
00025 void COM_Box_rel(int x, int y)
00026 {
00027     if (driver->Box_rel) {
00028         (*driver->Box_rel) (x, y);
00029         return;
00030     }
00031 
00032     COM_Box_abs(cur_x, cur_y, cur_x + x, cur_y + y);
00033 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines