pie.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * pie.h
  3. *
  4. */
  5. /* not available in SysV
  6. * #include "strings.h"
  7. */
  8. #include <grass/gis.h>
  9. #include "options.h"
  10. #include "dhist.h"
  11. /*******************************************************************
  12. *
  13. *
  14. * <cell-file name> in mapset <mapset name> <---- the title
  15. *
  16. * ......
  17. * ............
  18. * .................
  19. * .....................
  20. * ........................
  21. * ........................
  22. * ...........*............ <----- the pie
  23. * ........................
  24. * ........................
  25. * ....................
  26. * ................
  27. * ............
  28. * .......
  29. *
  30. * [][][][][][][][][][][][][][][][][][][][] <---- the category
  31. * ---+----+----+----+----+----+----+----+- number legend
  32. * n1 n2 n3 n4 nn
  33. *
  34. * Category values in <tic-mark number units> <--- legend label
  35. *
  36. *
  37. *******************************************************************
  38. */
  39. float rem(); /* remainder function */
  40. /* normalized coordinates & dimensions of pie-chart components */
  41. /* origin */
  42. #define ORIGIN_X 0.5
  43. #define ORIGIN_Y 0.59
  44. #define BAR_X1 0.13
  45. #define BAR_X2 0.87
  46. #define BAR_Y1 0.17
  47. #define BAR_Y2 0.23
  48. /* radius of pie */
  49. #define RADIUS 0.25
  50. /* height of legend "color-bar" */
  51. #define BAR_HEIGHT BAR_Y2-BAR_Y1
  52. /* minimum distance between numbered tic-marks on legend */
  53. #define XTIC_DIST 40
  54. /* sizes of legend tic-marks */
  55. #define BIG_TIC 0.025
  56. #define SMALL_TIC 0.015
  57. /* y-coordinate of legend label */
  58. #define LABEL 0.03
  59. /* y-coordinate of legend tic-mark numbers */
  60. #define XNUMS_Y 0.09
  61. /* text width and height */
  62. #define TEXT_HEIGHT 0.05
  63. #define TEXT_WIDTH TEXT_HEIGHT*0.5
  64. extern struct units tics[];