GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cairodriver/Driver.c
Go to the documentation of this file.
1 
2 /****************************************************************************
3  *
4  * MODULE: Cairo driver
5  * AUTHOR(S): Lars Ahlzen <lars@ahlzen.com>
6  * COPYRIGHT: (C) 2007 Lars Ahlzen
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 "cairodriver.h"
21 
22 const struct driver *Cairo_Driver(void)
23 {
24  static struct driver drv;
25  static int initialized;
26 
27  if (initialized)
28  return &drv;
29 
30  drv.Box_abs = Cairo_Box_abs;
31  drv.Box_rel = NULL;
32  drv.Client_Open = NULL;
34  drv.Erase = Cairo_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;
47  drv.Polyline_rel = NULL;
49  drv.Polygon_rel = NULL;
54  drv.Respond = Cairo_Respond;
55  drv.Work_stream = NULL;
56  drv.Do_work = NULL;
58  drv.color = Cairo_color;
62  drv.draw_text = NULL;
63 
64  initialized = 1;
65 
66  return &drv;
67 }
void Cairo_Polygon_abs(const int *, const int *, int)
Definition: Poly.c:12
void(* Erase)(void)
Definition: driver.h:31
void(* draw_line)(int, int, int, int)
Definition: driver.h:60
void Cairo_Graph_close(void)
void Cairo_Polyline_abs(const int *, const int *, int)
Definition: Poly.c:19
int(* Get_with_box)(int, int, int *, int *, int *)
Definition: driver.h:32
int(* Work_stream)(void)
Definition: driver.h:55
void Cairo_Respond(void)
void(* Client_Open)(void)
Definition: driver.h:29
void(* Do_work)(int)
Definition: driver.h:56
void Cairo_begin_scaled_raster(int, int[2][2], int[2][2])
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(* Line_width)(int)
Definition: driver.h:37
void(* Polygon_abs)(const int *, const int *, int)
Definition: driver.h:45
void Cairo_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
int Cairo_lookup_color(int, int, int)
int(* Graph_set)(int, char **)
Definition: driver.h:35
void Cairo_Client_Close(void)
void(* Client_Close)(void)
Definition: driver.h:30
void(* color)(int)
Definition: driver.h:59
void Cairo_draw_point(int, int)
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
void Cairo_Box_abs(int x1, int y1, int x2, int y2)
void Cairo_color(int)
int Cairo_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
void Cairo_end_scaled_raster(void)
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
void Cairo_draw_line(int, int, int, int)
void(* Panel_restore)(const char *)
Definition: driver.h:39
void Cairo_draw_bitmap(int, int, int, const unsigned char *)
Draw bitmap.
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 Cairo_Erase(void)
void(* Polydots_abs)(const int *, const int *, int)
Definition: driver.h:41
struct driver * Cairo_Driver(void)
int Cairo_Graph_set(int, char **)
void Cairo_Line_width(int)
void(* Graph_close)(void)
Definition: driver.h:36