svg.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*------------------------------------------------------------------------
  2. * Copyright 2009 (c) Jeff Brown <spadix@users.sourceforge.net>
  3. *
  4. * This file is part of the ZBar Bar Code Reader.
  5. *
  6. * The ZBar Bar Code Reader is free software; you can redistribute it
  7. * and/or modify it under the terms of the GNU Lesser Public License as
  8. * published by the Free Software Foundation; either version 2.1 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * The ZBar Bar Code Reader is distributed in the hope that it will be
  12. * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  13. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Lesser Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser Public License
  17. * along with the ZBar Bar Code Reader; if not, write to the Free
  18. * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  19. * Boston, MA 02110-1301 USA
  20. *
  21. * http://sourceforge.net/projects/zbar
  22. *------------------------------------------------------------------------*/
  23. #ifndef _SVG_H_
  24. #define _SVG_H_
  25. #ifdef DEBUG_SVG
  26. typedef enum { SVG_REL, SVG_ABS } svg_absrel_t;
  27. void svg_open(const char *name, double x, double y, double w, double h);
  28. void svg_close(void);
  29. void svg_commentf(const char *format, ...);
  30. void svg_image(const char *name, double width, double height);
  31. void svg_group_start(const char *cls, double rotate,
  32. double scalex, double scaley,
  33. double x, double y);
  34. void svg_group_end(void);
  35. void svg_path_start(const char *cls, double scale, double x, double y);
  36. void svg_path_end(void);
  37. void svg_path_close(void);
  38. void svg_path_moveto(svg_absrel_t abs, double x, double y);
  39. void svg_path_lineto(svg_absrel_t abs, double x, double y);
  40. #else
  41. # define svg_open(...)
  42. # define svg_close(...)
  43. # define svg_image(...)
  44. # define svg_group_start(...)
  45. # define svg_group_end(...)
  46. # define svg_path_start(...)
  47. # define svg_path_end(...)
  48. # define svg_path_moveto(...)
  49. # define svg_path_lineto(...)
  50. # define svg_path_close(...)
  51. #endif
  52. #endif