GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
pngdriver/Driver.c
Go to the documentation of this file.
1 
2 /****************************************************************************
3  *
4  * MODULE: PNG driver
5  * AUTHOR(S): Glynn Clements <glynn@gclements.plus.com>
6  * COPYRIGHT: (C) 2007 Glynn Clements
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  *****************************************************************************/
19 
20 #include "pngdriver.h"
21 
22 const struct driver *PNG_Driver(void)
23 {
24  static struct driver drv;
25  static int initialized;
26 
27  if (initialized)
28  return &drv;
29 
30  drv.Box_abs = PNG_Box_abs;
31  drv.Box_rel = NULL;
32  drv.Client_Open = NULL;
34  drv.Erase = PNG_Erase;
35  drv.Get_with_box = NULL;
36  drv.Get_with_line = NULL;
37  drv.Get_with_pointer = NULL;
41  drv.Panel_save = NULL;
42  drv.Panel_restore = NULL;
43  drv.Panel_delete = NULL;
44  drv.Polydots_abs = NULL;
45  drv.Polydots_rel = NULL;
46  drv.Polyline_abs = NULL;
47  drv.Polyline_rel = NULL;
48  drv.Polygon_abs = NULL;
49  drv.Polygon_rel = NULL;
53  drv.End_scaled_raster = NULL;
54  drv.Respond = PNG_Respond;
55  drv.Work_stream = NULL;
56  drv.Do_work = NULL;
58  drv.color = PNG_color;
62  drv.draw_text = NULL;
63 
64  initialized = 1;
65 
66  return &drv;
67 }