GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
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 }
50 
void PNG_Fill(void)
void PNG_Begin(void)
GRASS png display driver - header file.
void path_close(struct path *p)
Definition: driver/path.c:84
void PNG_Close(void)
void path_cont(struct path *p, double x, double y)
Definition: driver/path.c:79
void PNG_Move(double x, double y)
void PNG_Stroke(void)
#define x
void path_move(struct path *p, double x, double y)
Definition: driver/path.c:73
void png_draw_line(double x1, double y1, double x2, double y2)
Definition: draw_line.c:65
Definition: path.h:16
void png_polygon(struct path *)
Draw polygon.
void PNG_Cont(double x, double y)
void path_begin(struct path *p)
Definition: driver/path.c:67
void path_stroke(struct path *p, void(*line)(double, double, double, double))
Definition: driver/path.c:97