source: Generics/NativeGenerics/Specialized/SpecializedRectangle.pas

Last change on this file was 496, checked in by chronos, 6 years ago
  • Modified: New native generics classes working under FPC 3.0 transformed from TemplateGenerics package.
File size: 703 bytes
Line 
1unit SpecializedRectangle;
2
3{$mode Delphi}{$H+}
4
5interface
6
7uses
8 Classes, SysUtils, GenericPoint, Types, GenericRectangle;
9
10type
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
20implementation
21
22function TRectangle.GetTRect: TRect;
23begin
24 Result.Left := Left;
25 Result.Top := Top;
26 Result.Bottom := Bottom;
27 Result.Right := Right;
28end;
29
30procedure TRectangle.SetTRect(const AValue: TRect);
31begin
32 Left := AValue.Left;
33 Top := AValue.Top;
34 Bottom := AValue.Bottom;
35 Right := AValue.Right;
36end;
37
38
39end.
40
Note: See TracBrowser for help on using the repository browser.