htmlmap.h 1.3 KB

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