vedit.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef GRASS_VEDIT_H
  2. #define GRASS_VEDIT_H
  3. #include <grass/gis.h>
  4. #include <grass/vector.h>
  5. #define NO_SNAP 0 /* snapping disabled */
  6. #define SNAP 1 /* snapping enabled for nodes */
  7. #define SNAPVERTEX 2 /* snapping enabled for vertex also */
  8. #define QUERY_UNKNOWN -1
  9. #define QUERY_LENGTH 0 /* select by line length */
  10. #define QUERY_DANGLE 1 /* select dangles */
  11. /* used by Vedit_render_map() */
  12. #define TYPE_POINT 0x01
  13. #define TYPE_LINE 0x02
  14. #define TYPE_BOUNDARYNO 0x04
  15. #define TYPE_BOUNDARYTWO 0x08
  16. #define TYPE_BOUNDARYONE 0x10
  17. #define TYPE_CENTROIDIN 0x20
  18. #define TYPE_CENTROIDOUT 0x40
  19. #define TYPE_CENTROIDDUP 0x80
  20. #define TYPE_NODEONE 0x100
  21. #define TYPE_NODETWO 0x200
  22. #define TYPE_VERTEX 0x400
  23. #define TYPE_AREA 0x800
  24. #define TYPE_ISLE 0x1000
  25. #define TYPE_DIRECTION 0x2000
  26. #define DRAW_POINT 0x01
  27. #define DRAW_LINE 0x02
  28. #define DRAW_BOUNDARYNO 0x04
  29. #define DRAW_BOUNDARYTWO 0x08
  30. #define DRAW_BOUNDARYONE 0x10
  31. #define DRAW_CENTROIDIN 0x20
  32. #define DRAW_CENTROIDOUT 0x40
  33. #define DRAW_CENTROIDDUP 0x80
  34. #define DRAW_NODEONE 0x100
  35. #define DRAW_NODETWO 0x200
  36. #define DRAW_VERTEX 0x400
  37. #define DRAW_AREA 0x800
  38. #define DRAW_DIRECTION 0x1000
  39. struct rpoint {
  40. /* screen coordinates */
  41. int x, y;
  42. };
  43. struct robject {
  44. /* object to be rendered */
  45. int fid; /* feature id */
  46. int type;
  47. int npoints;
  48. struct rpoint *point; /* list of points */
  49. };
  50. struct robject_list {
  51. /* list of objects to be rendered */
  52. int nitems;
  53. struct robject **item;
  54. };
  55. #include <grass/defs/vedit.h>
  56. #endif /* GRASS_VEDIT_H */