GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71933
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 */
21 const 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;
48  drv.Bitmap = PNG_draw_bitmap;
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 }
void(* Font_info)(char ***, int *)
Definition: driver.h:54
char * name
Definition: driver.h:24
void(* Fill)(void)
Definition: driver.h:45
void PNG_Fill(void)
void PNG_Begin(void)
void(* Move)(double, double)
Definition: driver.h:41
GRASS png display driver - header file.
void PNG_Close(void)
void(* Erase)(void)
Definition: driver.h:27
void(* Font_list)(char ***, int *)
Definition: driver.h:53
void(* Stroke)(void)
Definition: driver.h:44
void(* Text_box)(const char *, double *, double *, double *, double *)
Definition: driver.h:51
void(* Color)(int, int, int)
Definition: driver.h:48
void(* Begin)(void)
Definition: driver.h:40
void PNG_Move(double x, double y)
void PNG_Stroke(void)
#define NULL
Definition: ccmath.h:32
const char * PNG_Graph_get_file(void)
Get render file.
void(* End_raster)(void)
Definition: driver.h:39
void PNG_Box(double fx1, double fy1, double fx2, double fy2)
Draw a (filled) rectangle.
Definition: pngdriver/box.c:24
struct driver * PNG_Driver(void)
Initialize display driver.
void PNG_Erase(void)
Erase screen.
int(* Graph_set)(void)
Definition: driver.h:28
const char *(* Graph_get_file)(void)
Definition: driver.h:30
void(* Point)(double, double)
Definition: driver.h:46
int PNG_Graph_set(void)
Start up graphics processing.
void(* Begin_raster)(int, int[2][2], double[2][2])
Definition: driver.h:33
int PNG_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Draw raster row.
void(* Set_font)(const char *)
Definition: driver.h:52
void(* Cont)(double, double)
Definition: driver.h:42
void(* Line_width)(double)
Definition: driver.h:31
void(* Set_window)(double, double, double, double)
Definition: driver.h:32
int(* Raster)(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition: driver.h:34
void(* Text)(const char *)
Definition: driver.h:50
Definition: driver.h:22
void(* Box)(double, double, double, double)
Definition: driver.h:26
void PNG_Line_width(double width)
Set line width.
void(* Close)(void)
Definition: driver.h:43
void PNG_begin_raster(int, int[2][2], double[2][2])
Start drawing raster.
void PNG_Cont(double x, double y)
void PNG_color_rgb(int r, int g, int b)
Identify a color.
void PNG_Graph_close(void)
Close down the graphics processing. This gets called only at driver termination time.
void PNG_Point(double, double)
Draw point.
Definition: point.c:20
void PNG_Set_window(double, double, double, double)
Set window.
void(* Bitmap)(int, int, int, const unsigned char *)
Definition: driver.h:49
void PNG_draw_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
Draw bitmap.
void(* Graph_close)(void)
Definition: driver.h:29