14 static void store_xy(
double x,
double y)
16 int xi = (int) floor(x);
17 int yi = (int) floor(y);
25 static void swap(
double *a,
double *
b)
27 double t = *a; *a = *
b; *b =
t;
30 static void draw_line(
double x1,
double y1,
double x2,
double y2)
35 if (fabs(y1 - y2) > fabs(x1 - x2)) {
44 for (y = floor(y1) + 0.5; y < y2; y++) {
45 x = x1 + (y - y1) * dx / dy;
58 for (x = floor(x1) + 0.5; x < x2; x++) {
59 y = y1 + (x - x1) * dy / dx;
73 draw_line(x1, y1, x2, y2);
GRASS png display driver - header file.
void path_close(struct path *p)
void path_cont(struct path *p, double x, double y)
void path_move(struct path *p, double x, double y)
void png_draw_line(double x1, double y1, double x2, double y2)
void png_polygon(struct path *)
Draw polygon.