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