GRASS Programmer's Manual
6.4.2(2012)
|
00001 00002 /**************************************************************************** 00003 * 00004 * MODULE: PNG driver 00005 * AUTHOR(S): Glynn Clements <glynn@gclements.plus.com> 00006 * COPYRIGHT: (C) 2007 Glynn Clements 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 "pngdriver.h" 00021 00022 const struct driver *PNG_Driver(void) 00023 { 00024 static struct driver drv; 00025 static int initialized; 00026 00027 if (initialized) 00028 return &drv; 00029 00030 drv.Box_abs = PNG_Box_abs; 00031 drv.Box_rel = NULL; 00032 drv.Client_Open = NULL; 00033 drv.Client_Close = PNG_Client_Close; 00034 drv.Erase = PNG_Erase; 00035 drv.Get_with_box = NULL; 00036 drv.Get_with_line = NULL; 00037 drv.Get_with_pointer = NULL; 00038 drv.Graph_set = PNG_Graph_set; 00039 drv.Graph_close = PNG_Graph_close; 00040 drv.Line_width = PNG_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 = NULL; 00047 drv.Polyline_rel = NULL; 00048 drv.Polygon_abs = NULL; 00049 drv.Polygon_rel = NULL; 00050 drv.Set_window = PNG_Set_window; 00051 drv.Begin_scaled_raster = PNG_begin_scaled_raster; 00052 drv.Scaled_raster = PNG_scaled_raster; 00053 drv.End_scaled_raster = NULL; 00054 drv.Respond = PNG_Respond; 00055 drv.Work_stream = NULL; 00056 drv.Do_work = NULL; 00057 drv.lookup_color = PNG_lookup_color; 00058 drv.color = PNG_color; 00059 drv.draw_line = PNG_draw_line; 00060 drv.draw_point = PNG_draw_point; 00061 drv.draw_bitmap = PNG_draw_bitmap; 00062 drv.draw_text = NULL; 00063 00064 initialized = 1; 00065 00066 return &drv; 00067 }