GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
driver/Polyline.c
Go to the documentation of this file.
1 #include "driver.h"
2 #include "driverlib.h"
3 
4 void COM_Polyline_abs(const int *xarray, const int *yarray, int number)
5 {
6  int i;
7 
8  if (driver->Polyline_abs) {
9  (*driver->Polyline_abs) (xarray, yarray, number);
10  return;
11  }
12 
13  COM_Move_abs(xarray[0], yarray[0]);
14 
15  for (i = 1; i < number; i++)
16  COM_Cont_abs(xarray[i], yarray[i]);
17 }
18 
19 void COM_Polyline_rel(const int *xarray, const int *yarray, int number)
20 {
21  int i;
22 
23  if (driver->Polyline_rel) {
24  (*driver->Polyline_rel) (xarray, yarray, number);
25  return;
26  }
27 
28  COM_Move_rel(xarray[0], yarray[0]);
29 
30  for (i = 1; i < number; i++)
31  COM_Cont_rel(xarray[i], yarray[i]);
32 }
void COM_Move_abs(int, int)
Definition: Move.c:4
void COM_Cont_rel(int x, int y)
Definition: Cont.c:11
void COM_Move_rel(int, int)
Definition: Move.c:10
void COM_Polyline_abs(const int *, const int *, int)
void(* Polyline_rel)(const int *, const int *, int)
Definition: driver.h:44
void(* Polyline_abs)(const int *, const int *, int)
Definition: driver.h:43
void COM_Polyline_rel(const int *, const int *, int)
Definition: driver.h:25
void COM_Cont_abs(int x, int y)
Definition: Cont.c:4