GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 }
void PNG_draw_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
void PNG_Client_Close(void)
void(* Erase)(void)
Definition: driver.h:31
void(* draw_line)(int, int, int, int)
Definition: driver.h:60
void PNG_Graph_close(void)
int(* Get_with_box)(int, int, int *, int *, int *)
Definition: driver.h:32
int(* Work_stream)(void)
Definition: driver.h:55
void PNG_color(int number)
void(* Client_Open)(void)
Definition: driver.h:29
void(* Do_work)(int)
Definition: driver.h:56
void(* Respond)(void)
Definition: driver.h:54
void(* Box_abs)(int, int, int, int)
Definition: driver.h:27
int(* Get_with_line)(int, int, int *, int *, int *)
Definition: driver.h:33
void(* draw_text)(const char *)
Definition: driver.h:63
void(* Box_rel)(int, int)
Definition: driver.h:28
void(* draw_bitmap)(int, int, int, const unsigned char *)
Definition: driver.h:62
void PNG_Line_width(int width)
void(* Line_width)(int)
Definition: driver.h:37
void(* Polygon_abs)(const int *, const int *, int)
Definition: driver.h:45
void PNG_Set_window(int, int, int, int)
void(* Panel_delete)(const char *)
Definition: driver.h:40
void(* Polyline_rel)(const int *, const int *, int)
Definition: driver.h:44
void(* Polyline_abs)(const int *, const int *, int)
Definition: driver.h:43
void PNG_Erase(void)
void PNG_Box_abs(int x1, int y1, int x2, int y2)
Definition: pngdriver/Box.c:4
struct driver * PNG_Driver(void)
int PNG_Graph_set(int argc, char **argv)
int(* Graph_set)(int, char **)
Definition: driver.h:35
void(* Client_Close)(void)
Definition: driver.h:30
void(* color)(int)
Definition: driver.h:59
void PNG_begin_scaled_raster(int, int[2][2], int[2][2])
void PNG_Respond(void)
void PNG_draw_line(int x1, int y1, int x2, int y2)
void(* Polygon_rel)(const int *, const int *, int)
Definition: driver.h:46
void(* Begin_scaled_raster)(int, int[2][2], int[2][2])
Definition: driver.h:48
int(* Get_with_pointer)(int *, int *, int *)
Definition: driver.h:34
int PNG_scaled_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
void(* End_scaled_raster)(void)
Definition: driver.h:53
return NULL
Definition: dbfopen.c:1394
Definition: driver.h:25
int(* Scaled_raster)(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition: driver.h:49
void(* Set_window)(int, int, int, int)
Definition: driver.h:47
void(* draw_point)(int, int)
Definition: driver.h:61
int(* lookup_color)(int, int, int)
Definition: driver.h:58
int PNG_lookup_color(int r, int g, int b)
void(* Panel_restore)(const char *)
Definition: driver.h:39
void(* Panel_save)(const char *, int, int, int, int)
Definition: driver.h:38
void(* Polydots_rel)(const int *, const int *, int)
Definition: driver.h:42
void(* Polydots_abs)(const int *, const int *, int)
Definition: driver.h:41
void PNG_draw_point(int x, int y)
void(* Graph_close)(void)
Definition: driver.h:36