Driver.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /****************************************************************************
  2. *
  3. * MODULE: PNG driver
  4. * AUTHOR(S): Glynn Clements <glynn@gclements.plus.com>
  5. * COPYRIGHT: (C) 2007 Glynn Clements
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. *****************************************************************************/
  18. #include "pngdriver.h"
  19. const struct driver *PNG_Driver(void)
  20. {
  21. static struct driver drv;
  22. static int initialized;
  23. if (initialized)
  24. return &drv;
  25. drv.name = "png";
  26. drv.Box = PNG_Box;
  27. drv.Erase = PNG_Erase;
  28. drv.Graph_set = PNG_Graph_set;
  29. drv.Graph_close = PNG_Graph_close;
  30. drv.Line_width = PNG_Line_width;
  31. drv.Set_window = PNG_Set_window;
  32. drv.Begin_raster = PNG_begin_raster;
  33. drv.Raster = PNG_raster;
  34. drv.End_raster = NULL;
  35. drv.Begin = PNG_Begin;
  36. drv.Move = PNG_Move;
  37. drv.Cont = PNG_Cont;
  38. drv.Close = PNG_Close;
  39. drv.Stroke = PNG_Stroke;
  40. drv.Fill = PNG_Fill;
  41. drv.Point = PNG_Point;
  42. drv.Color = PNG_color_rgb;
  43. drv.Bitmap = PNG_draw_bitmap;
  44. drv.Text = NULL;
  45. drv.Text_box = NULL;
  46. drv.Set_font = NULL;
  47. drv.Font_list = NULL;
  48. drv.Font_info = NULL;
  49. initialized = 1;
  50. return &drv;
  51. }