draw.c 763 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*!
  2. \file lib/pngdriver/draw.c
  3. \brief GRASS PNG display driver
  4. (C) 2008 by Glynn Clements and the GRASS Development Team
  5. This program is free software under the GNU General Public License
  6. (>=v2). Read the file COPYING that comes with GRASS for details.
  7. \author Glynn Clements
  8. */
  9. #include <grass/gis.h>
  10. #include "driverlib.h"
  11. #include "path.h"
  12. #include "pngdriver.h"
  13. static struct path path;
  14. void PNG_Begin(void)
  15. {
  16. path_begin(&path);
  17. }
  18. void PNG_Move(double x, double y)
  19. {
  20. path_move(&path, x, y);
  21. }
  22. void PNG_Cont(double x, double y)
  23. {
  24. path_cont(&path, x, y);
  25. }
  26. void PNG_Close(void)
  27. {
  28. path_close(&path);
  29. }
  30. void PNG_Stroke(void)
  31. {
  32. path_stroke(&path, png_draw_line);
  33. }
  34. void PNG_Fill(void)
  35. {
  36. png_polygon(&path);
  37. }