htmlmap.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #include <stdio.h>
  2. #include "path.h"
  3. #define DEF_MINBBOX 2
  4. #define DEF_MINDIST 2
  5. #define DEF_MAXPTS 99
  6. #define FILE_NAME "htmlmap"
  7. #define INITIAL_TEXT 1000
  8. #define APACHE 0 /* write output in apache/ncsa server image map format */
  9. #define NCSA 0 /* write output in apache/ncsa server image map format */
  10. #define CLIENT 1 /* write output in netscape client side image map format */
  11. #define RAW 2 /* write output in raw format */
  12. struct MapPoly
  13. {
  14. char *url;
  15. int num_pts;
  16. int *x_pts;
  17. int *y_pts;
  18. struct MapPoly *next_poly;
  19. };
  20. struct html_state
  21. {
  22. char *last_text;
  23. int last_text_len;
  24. int type;
  25. FILE *output;
  26. struct MapPoly *head;
  27. struct MapPoly **tail;
  28. int MAX_POINTS;
  29. int BBOX_MINIMUM;
  30. int MINIMUM_DIST;
  31. };
  32. extern struct html_state html;
  33. /* Draw.c */
  34. extern void HTML_Begin(void);
  35. extern void HTML_Move(double, double);
  36. extern void HTML_Cont(double, double);
  37. extern void HTML_Close(void);
  38. extern void HTML_Fill(void);
  39. extern void HTML_Stroke(void);
  40. /* Driver.c */
  41. extern const struct driver *HTML_Driver(void);
  42. /* Graph_Clse.c */
  43. extern void HTML_Graph_close(void);
  44. /* Graph_Set.c */
  45. extern int HTML_Graph_set(void);
  46. /* Box.c */
  47. extern void HTML_Box(double, double, double, double);
  48. /* Polygon.c */
  49. extern void html_polygon(const struct path *);
  50. /* Text.c */
  51. extern void HTML_Text(const char *);