Changeset 22 for branches/overos/UTypes.pas
- Timestamp:
- Dec 30, 2018, 1:01:14 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/overos/UTypes.pas
r21 r22 18 18 class operator Add(A, B: TSize): TSize; 19 19 class operator Subtract(A, B: TSize): TSize; 20 class operator Equal(A, B: TSize): Boolean; 20 21 end; 21 22 … … 28 29 class operator Add(A, B: TPosition): TPosition; 29 30 class operator Subtract(A, B: TPosition): TPosition; 31 class operator Equal(A, B: TPosition): Boolean; 30 32 end; 31 33 … … 37 39 function Create(Position: TPosition; Size: TSize): TRectangle; 38 40 function Contains(Position: TPosition): Boolean; 41 class operator Equal(A, B: TRectangle): Boolean; 42 end; 43 44 TMessage = class 45 Handle: TObject; 39 46 end; 40 47 … … 56 63 (Self.Position.Left + Self.Size.Width >= Position.Left) and 57 64 (Self.Position.Top + Self.Size.Height >= Position.Top); 65 end; 66 67 class operator TRectangle.Equal(A, B: TRectangle): Boolean; 68 begin 69 Result := (A.Position = B.Position) and (A.Size = B.Size); 58 70 end; 59 71 … … 78 90 end; 79 91 92 class operator TPosition.Equal(A, B: TPosition): Boolean; 93 begin 94 Result := (A.Left = B.Left) and (A.Top = B.Top); 95 end; 96 80 97 { TSize } 81 98 … … 98 115 end; 99 116 117 class operator TSize.Equal(A, B: TSize): Boolean; 118 begin 119 Result := (A.Width = B.Width) and (A.Height = B.Height); 120 end; 121 100 122 101 123 end.
Note:
See TracChangeset
for help on using the changeset viewer.