rect.pp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. (******************************************************************************
  2. *
  3. * Copyright (c) 1994-2000 Palm, Inc. or its subsidiaries.
  4. * All rights reserved.
  5. *
  6. * File: Rect.h
  7. *
  8. * Release: Palm OS SDK 4.0 (63220)
  9. *
  10. * Description:
  11. * This file defines rectangle structures and routines.
  12. *
  13. * History:
  14. * November 3, 1994 Created by Roger Flores
  15. * Name Date Description
  16. * ---- ---- -----------
  17. * bob 2/9/99 Use Coord abstraction, fix up consts
  18. *
  19. *****************************************************************************)
  20. {$MACRO ON}
  21. unit rect;
  22. interface
  23. uses palmos, coretraps;
  24. type
  25. AbsRectType = record
  26. left: Coord;
  27. top: Coord;
  28. right: Coord;
  29. bottom: Coord;
  30. end;
  31. PointType = record
  32. x: Coord;
  33. y: Coord;
  34. end;
  35. PointPtr = ^PointType;
  36. RectangleType = record
  37. topLeft: PointType;
  38. extent: PointType;
  39. end;
  40. RectanglePtr = ^RectangleType;
  41. procedure RctSetRectangle(var rP: RectangleType; left, top, width, height: Coord); syscall sysTrapRctSetRectangle;
  42. procedure RctCopyRectangle({const} var srcRectP: RectangleType; var dstRectP: RectangleType); syscall sysTrapRctCopyRectangle;
  43. procedure RctInsetRectangle(var rP: RectangleType; insetAmt: Coord); syscall sysTrapRctInsetRectangle;
  44. procedure RctOffsetRectangle(var rP: RectangleType; deltaX, deltaY: Coord); syscall sysTrapRctOffsetRectangle;
  45. function RctPtInRectangle(x, y: Coord; {const} var rP: RectangleType): Boolean; syscall sysTrapRctPtInRectangle;
  46. procedure RctGetIntersection({const} var r1P, r2P: RectangleType; var r3P: RectangleType); syscall sysTrapRctGetIntersection;
  47. implementation
  48. end.