GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
Loading...
Searching...
No Matches
pngdriver/driver.c
Go to the documentation of this file.
1/*!
2 \file lib/pngdriver/driver.c
3
4 \brief GRASS png display driver - driver initialization
5
6 (C) 2007-2014 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 "pngdriver.h"
15
16/*!
17 \brief Initialize display driver
18
19 \return pointer driver structure
20 */
21const struct driver *PNG_Driver(void)
22{
23 static struct driver drv;
24 static int initialized;
25
26 if (initialized)
27 return &drv;
28
29 drv.name = "png";
30 drv.Box = PNG_Box;
31 drv.Erase = PNG_Erase;
38 drv.Raster = PNG_raster;
39 drv.End_raster = NULL;
40 drv.Begin = PNG_Begin;
41 drv.Move = PNG_Move;
42 drv.Cont = PNG_Cont;
43 drv.Close = PNG_Close;
44 drv.Stroke = PNG_Stroke;
45 drv.Fill = PNG_Fill;
46 drv.Point = PNG_Point;
47 drv.Color = PNG_color_rgb;
49 drv.Text = NULL;
50 drv.Text_box = NULL;
51 drv.Set_font = NULL;
52 drv.Font_list = NULL;
53 drv.Font_info = NULL;
54
55 initialized = 1;
56
57 return &drv;
58}
#define NULL
Definition ccmath.h:32
void PNG_Box(double fx1, double fy1, double fx2, double fy2)
Draw a (filled) rectangle.
void PNG_color_rgb(int r, int g, int b)
Identify a color.
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)
void PNG_draw_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
Draw bitmap.
const struct driver * PNG_Driver(void)
Initialize display driver.
void PNG_Erase(void)
Erase screen.
void PNG_Graph_close(void)
Close down the graphics processing. This gets called only at driver termination time.
int PNG_Graph_set(void)
Start up graphics processing.
const char * PNG_Graph_get_file(void)
Get render file.
void PNG_Line_width(double width)
Set line width.
GRASS png display driver - header file.
int PNG_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
void PNG_begin_raster(int, int[2][2], double[2][2])
Start drawing raster.
void PNG_Point(double, double)
Draw point.
Definition point.c:20
void PNG_Set_window(double, double, double, double)
Set window.
void(* Graph_close)(void)
Definition driver.h:27
void(* Line_width)(double)
Definition driver.h:29
void(* Font_info)(char ***, int *)
Definition driver.h:49
void(* Text_box)(const char *, double *, double *, double *, double *)
Definition driver.h:46
void(* Point)(double, double)
Definition driver.h:41
void(* Fill)(void)
Definition driver.h:40
const char *(* Graph_get_file)(void)
Definition driver.h:28
void(* Erase)(void)
Definition driver.h:25
int(* Raster)(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition driver.h:32
void(* Stroke)(void)
Definition driver.h:39
void(* Begin)(void)
Definition driver.h:35
void(* Font_list)(char ***, int *)
Definition driver.h:48
void(* End_raster)(void)
Definition driver.h:34
void(* Box)(double, double, double, double)
Definition driver.h:24
void(* Move)(double, double)
Definition driver.h:36
void(* Begin_raster)(int, int[2][2], double[2][2])
Definition driver.h:31
char * name
Definition driver.h:22
void(* Close)(void)
Definition driver.h:38
void(* Set_window)(double, double, double, double)
Definition driver.h:30
int(* Graph_set)(void)
Definition driver.h:26
void(* Set_font)(const char *)
Definition driver.h:47
void(* Text)(const char *)
Definition driver.h:45
void(* Cont)(double, double)
Definition driver.h:37
void(* Color)(int, int, int)
Definition driver.h:43
void(* Bitmap)(int, int, int, const unsigned char *)
Definition driver.h:44