| Line | |
|---|
| 1 | unit SpecializedRectangle;
|
|---|
| 2 |
|
|---|
| 3 | {$mode Delphi}{$H+}
|
|---|
| 4 |
|
|---|
| 5 | interface
|
|---|
| 6 |
|
|---|
| 7 | uses
|
|---|
| 8 | Classes, SysUtils, GenericPoint, Types, GenericRectangle;
|
|---|
| 9 |
|
|---|
| 10 | type
|
|---|
| 11 | TRectangle = class(TGRectangle<Integer>)
|
|---|
| 12 | private
|
|---|
| 13 | procedure SetTRect(const AValue: TRect);
|
|---|
| 14 | function GetTRect: TRect;
|
|---|
| 15 | public
|
|---|
| 16 | property AsTRect: TRect read GetTRect write SetTRect;
|
|---|
| 17 | end;
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | implementation
|
|---|
| 21 |
|
|---|
| 22 | function TRectangle.GetTRect: TRect;
|
|---|
| 23 | begin
|
|---|
| 24 | Result.Left := Left;
|
|---|
| 25 | Result.Top := Top;
|
|---|
| 26 | Result.Bottom := Bottom;
|
|---|
| 27 | Result.Right := Right;
|
|---|
| 28 | end;
|
|---|
| 29 |
|
|---|
| 30 | procedure TRectangle.SetTRect(const AValue: TRect);
|
|---|
| 31 | begin
|
|---|
| 32 | Left := AValue.Left;
|
|---|
| 33 | Top := AValue.Top;
|
|---|
| 34 | Bottom := AValue.Bottom;
|
|---|
| 35 | Right := AValue.Right;
|
|---|
| 36 | end;
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 | end.
|
|---|
| 40 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.