GRASS Programmer's Manual  6.4.2(2012)
cairodriver/Driver.c
Go to the documentation of this file.
00001 
00002 /****************************************************************************
00003  *
00004  * MODULE:       Cairo driver
00005  * AUTHOR(S):    Lars Ahlzen <lars@ahlzen.com>
00006  * COPYRIGHT:    (C) 2007 Lars Ahlzen
00007  *
00008  *  This program is free software; you can redistribute it and/or modify
00009  *  it under the terms of the GNU General Public License as published by
00010  *  the Free Software Foundation; either version 2 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  This program is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *  GNU General Public License for more details.
00017  *
00018  *****************************************************************************/
00019 
00020 #include "cairodriver.h"
00021 
00022 const struct driver *Cairo_Driver(void)
00023 {
00024     static struct driver drv;
00025     static int initialized;
00026 
00027     if (initialized)
00028         return &drv;
00029 
00030     drv.Box_abs = Cairo_Box_abs;
00031     drv.Box_rel = NULL;
00032     drv.Client_Open = NULL;
00033     drv.Client_Close = Cairo_Client_Close;
00034     drv.Erase = Cairo_Erase;
00035     drv.Get_with_box = NULL;
00036     drv.Get_with_line = NULL;
00037     drv.Get_with_pointer = NULL;
00038     drv.Graph_set = Cairo_Graph_set;
00039     drv.Graph_close = Cairo_Graph_close;
00040     drv.Line_width = Cairo_Line_width;
00041     drv.Panel_save = NULL;
00042     drv.Panel_restore = NULL;
00043     drv.Panel_delete = NULL;
00044     drv.Polydots_abs = NULL;
00045     drv.Polydots_rel = NULL;
00046     drv.Polyline_abs = Cairo_Polyline_abs;
00047     drv.Polyline_rel = NULL;
00048     drv.Polygon_abs = Cairo_Polygon_abs;
00049     drv.Polygon_rel = NULL;
00050     drv.Set_window = Cairo_Set_window;
00051     drv.Begin_scaled_raster = Cairo_begin_scaled_raster;
00052     drv.Scaled_raster = Cairo_scaled_raster;
00053     drv.End_scaled_raster = Cairo_end_scaled_raster;
00054     drv.Respond = Cairo_Respond;
00055     drv.Work_stream = NULL;
00056     drv.Do_work = NULL;
00057     drv.lookup_color = Cairo_lookup_color;
00058     drv.color = Cairo_color;
00059     drv.draw_line = Cairo_draw_line;
00060     drv.draw_point = Cairo_draw_point;
00061     drv.draw_bitmap = Cairo_draw_bitmap;
00062     drv.draw_text = NULL;
00063 
00064     initialized = 1;
00065 
00066     return &drv;
00067 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines