home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / gl_dev.idb / usr / include / gl / rect.h.z / rect.h
Encoding:
C/C++ Source or Header  |  1996-12-06  |  681 b   |  50 lines

  1. #ifndef __GL_RECT_H__
  2. #define __GL_RECT_H__
  3.  
  4. /*
  5. **    defines for area and xy utilities
  6. **
  7. */ 
  8. #ident "$Revision: 1.3 $"
  9.  
  10. #ifndef MIN
  11. #define MIN(a, b)    (((a) < (b)) ? (a) : (b))
  12. #endif
  13.  
  14. #ifndef MAX
  15. #define MAX(a, b)    (((a) > (b)) ? (a) : (b))
  16. #ednf
  17.  
  18. #ifndef ABS
  19. #define ABS(a)        (((a) > 0) ? (a) : -(a))
  20. #endif
  21.  
  22. typedef struct
  23. {
  24.     float x;
  25.     float y;
  26. } XY;
  27.  
  28. typedef struct 
  29. {
  30.     XY origin;
  31.     XY corner;
  32. } Rect;
  33.  
  34. XY xy();
  35. Rect area();
  36. Rect rectarea();
  37. Rect makerect();
  38. Rect intersect();
  39. Rect legalport();
  40. Rect trans();
  41. Rect grow();
  42. Rect shrink();
  43. Rect movebottomedge();
  44. Rect movetopedge();
  45. Rect moveleftedge();
  46. Rect moverightedge();
  47. Rect screenarea();
  48.  
  49. #endif /* __GL_RECT_H__ */
  50.