Changeset 20 for branches/Xvcl/Xvcl.Classes.pas
- Timestamp:
- May 6, 2013, 12:16:30 AM (12 years ago)
- Location:
- branches/Xvcl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Xvcl
- Property svn:ignore
-
old new 2 2 *.local 3 3 Win32 4 __history
-
- Property svn:ignore
-
branches/Xvcl/Xvcl.Classes.pas
r19 r20 21 21 function GetBottomLeft: TPoint; 22 22 function GetBottomRight: TPoint; 23 function GetLeftTop: TPoint; 24 function GetRightTop: TPoint; 23 function GetTopLeft: TPoint; 24 function GetTopRight: TPoint; 25 procedure SetTopLeft(const Value: TPoint); 26 procedure SetBottomRight(const Value: TPoint); 27 procedure SetBottom(const Value: Integer); 28 procedure SetRight(const Value: Integer); 29 procedure SetTopRight(const Value: TPoint); 25 30 public 26 31 Left: Integer; … … 28 33 Width: Integer; 29 34 Height: Integer; 30 property Right: Integer read GetRight ;31 property Bottom: Integer read GetBottom ;35 property Right: Integer read GetRight write SetRight; 36 property Bottom: Integer read GetBottom write SetBottom; 32 37 property Size: TPoint read GetSize; 33 38 property Position: TPoint read GetPosition; 34 property LeftTop: TPoint read GetLeftTop;35 property BottomRight: TPoint read GetBottomRight ;36 property RightTop: TPoint read GetRightTop;39 property TopLeft: TPoint read GetTopLeft write SetTopLeft; 40 property BottomRight: TPoint read GetBottomRight write SetBottomRight; 41 property TopRight: TPoint read GetTopRight write SetTopRight; 37 42 property BottomLeft: TPoint read GetBottomLeft; 38 43 constructor Create(Left, Top, Width, Height: Integer); … … 86 91 end; 87 92 88 function TRectangle.Get LeftTop: TPoint;93 function TRectangle.GetTopLeft: TPoint; 89 94 begin 90 95 Result := TPoint.Create(Left, Top); … … 101 106 end; 102 107 103 function TRectangle.Get RightTop: TPoint;108 function TRectangle.GetTopRight: TPoint; 104 109 begin 105 110 Result := TPoint.Create(Right, Top); 111 end; 112 113 procedure TRectangle.SetBottom(const Value: Integer); 114 begin 115 Height := Value - Top; 116 end; 117 118 procedure TRectangle.SetBottomRight(const Value: TPoint); 119 begin 120 Right := Value.X; 121 Bottom := Value.Y; 122 end; 123 124 procedure TRectangle.SetRight(const Value: Integer); 125 begin 126 Width := Value - Left; 127 end; 128 129 procedure TRectangle.SetTopLeft(const Value: TPoint); 130 begin 131 Left := Value.X; 132 Top := Value.Y; 133 end; 134 135 procedure TRectangle.SetTopRight(const Value: TPoint); 136 begin 137 Top := Value.X; 138 Right := Value.Y; 106 139 end; 107 140
Note:
See TracChangeset
for help on using the changeset viewer.