GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
pngdriver/draw.c
Go to the documentation of this file.
1 /*!
2  \file lib/pngdriver/draw.c
3 
4  \brief GRASS PNG display driver
5 
6  (C) 2008 by Glynn Clements and the GRASS Development Team
7 
8  This program is free software under the GNU General Public License
9  (>=v2). Read the file COPYING that comes with GRASS for details.
10 
11  \author Glynn Clements
12  */
13 
14 #include <grass/gis.h>
15 #include "driverlib.h"
16 #include "path.h"
17 #include "pngdriver.h"
18 
19 static struct path path;
20 
21 void PNG_Begin(void)
22 {
23  path_begin(&path);
24 }
25 
26 void PNG_Move(double x, double y)
27 {
28  path_move(&path, x, y);
29 }
30 
31 void PNG_Cont(double x, double y)
32 {
33  path_cont(&path, x, y);
34 }
35 
36 void PNG_Close(void)
37 {
38  path_close(&path);
39 }
40 
41 void PNG_Stroke(void)
42 {
44 }
45 
46 void PNG_Fill(void)
47 {
48  png_polygon(&path);
49 }
void png_draw_line(double x1, double y1, double x2, double y2)
Definition: draw_line.c:68
void path_close(struct path *p)
Definition: driver/path.c:83
void path_stroke(struct path *p, void(*line)(double, double, double, double))
Definition: driver/path.c:96
void path_begin(struct path *p)
Definition: driver/path.c:66
void path_cont(struct path *p, double x, double y)
Definition: driver/path.c:78
void path_move(struct path *p, double x, double y)
Definition: driver/path.c:72
void PNG_Close(void)
void PNG_Begin(void)
void PNG_Cont(double x, double y)
void PNG_Move(double x, double y)
void PNG_Stroke(void)
void PNG_Fill(void)
GRASS png display driver - header file.
void png_polygon(struct path *)
Draw polygon.
Definition: path.h:15
#define x