# revisions: 43950,44275,44276,44277,44278,44280,44282,44290

git-svn-id: branches/fixes_3_2@44298 -
This commit is contained in:
marco 2020-03-14 15:22:22 +00:00
parent e7d6528f14
commit 913dd3190f
12 changed files with 116 additions and 87 deletions

View File

@ -37,13 +37,13 @@ uses
SysUtils, strutils;
{ most commonly used }
function GetVal(tag, attribname_ci: string): string;
function GetTagName(Tag: string): string;
function GetVal(const tag, attribname_ci: string): string;
function GetTagName(const Tag: string): string;
{ less commonly used, but useful }
function GetUpTagName(tag: string): string;
function GetNameValPair(tag, attribname_ci: string): string;
function GetValFromNameVal(namevalpair: string): string;
function GetUpTagName(const tag: string): string;
function GetNameValPair(const tag, attribname_ci: string): string;
function GetValFromNameVal(const namevalpair: string): string;
{ old buggy code}
function GetVal_JAMES(tag, attribname_ci: string): string;
@ -64,15 +64,17 @@ begin
end;
{ Return tag name, case preserved }
function GetTagName(Tag: string): string;
function GetTagName(const Tag: string): string;
var
P : Pchar;
S : Pchar;
begin
P := Pchar(Tag);
while P^ in ['<',' ',#9] do inc(P);
while P^ in ['<',' ',#9] do
inc(P);
S := P;
while Not (P^ in [' ','>',#0]) do inc(P);
while Not (P^ in [' ','>',#0]) do
inc(P);
if P > S then
Result := CopyBuffer( S, P-S)
else
@ -80,15 +82,17 @@ begin
end;
{ Return tag name in uppercase }
function GetUpTagName(tag: string): string;
function GetUpTagName(const tag: string): string;
var
P : Pchar;
S : Pchar;
begin
P := Pchar(uppercase(Tag));
while P^ in ['<',' ',#9] do inc(P);
while P^ in ['<',' ',#9] do
inc(P);
S := P;
while Not (P^ in [' ','>',#0]) do inc(P);
while Not (P^ in [' ','>',#0]) do
inc(P);
if P > S then
Result := CopyBuffer( S, P-S)
else
@ -98,7 +102,7 @@ end;
{ Return name=value pair ignoring case of NAME, preserving case of VALUE
Lars' fixed version }
function GetNameValPair(tag, attribname_ci: string): string;
function GetNameValPair(const tag, attribname_ci: string): string;
var
P : Pchar;
S : Pchar;
@ -157,7 +161,7 @@ end;
{ Get value of attribute, e.g WIDTH=36 -return-> 36, preserves case sensitive }
function GetValFromNameVal(namevalpair: string): string;
function GetValFromNameVal(const namevalpair: string): string;
var
P: Pchar;
S: Pchar;
@ -192,7 +196,7 @@ end;
{ return value of an attribute (attribname_ci), case ignored for NAME portion, but return value case is preserved }
function GetVal(tag, attribname_ci: string): string;
function GetVal(const tag, attribname_ci: string): string;
var namevalpair: string;
begin
// returns full name=value pair
@ -231,7 +235,8 @@ begin
while not (P^ in ['=',' ','>',#0]) do
inc(P);
if (P^ = '=') then inc(P);
if (P^ = '=') then
inc(P);
while not (P^ in [' ','>',#0]) do
begin
@ -286,7 +291,8 @@ begin
while not (P^ in ['=',' ','>',#0]) do
inc(P);
if (P^ = '=') then inc(P);
if (P^ = '=') then
inc(P);
while not (P^ in [' ','>',#0]) do
begin
@ -302,7 +308,8 @@ begin
while not (P^ in [C, '>', #0]) do
inc(P);
if (P^<>'>') then inc(P); { Skip current character, except '>' }
if (P^<>'>') then
inc(P); { Skip current character, except '>' }
break;
end;

View File

@ -2607,7 +2607,10 @@ begin
if assigned(Buffer) then
begin
inc(CurrBuff,FFieldBufPositions[Field.FieldNo-1]);
Move(CurrBuff^, Buffer^, GetFieldSize(FieldDefs[Field.FieldNo-1]));
if Field.IsBlob then // we need GetFieldSize for BLOB but Field.DataSize for others - #36747
Move(CurrBuff^, Buffer^, GetFieldSize(FieldDefs[Field.FieldNo-1]))
else
Move(CurrBuff^, Buffer^, Field.DataSize);
end;
Result := True;
end
@ -2649,7 +2652,10 @@ begin
inc(CurrBuff,FFieldBufPositions[Field.FieldNo-1]);
if assigned(buffer) then
begin
Move(Buffer^, CurrBuff^, GetFieldSize(FieldDefs[Field.FieldNo-1]));
if Field.IsBlob then // we need GetFieldSize for BLOB but Field.DataSize for others - #36747
Move(Buffer^, CurrBuff^, GetFieldSize(FieldDefs[Field.FieldNo-1]))
else
Move(Buffer^, CurrBuff^, Field.DataSize);
unSetFieldIsNull(NullMask,Field.FieldNo-1);
end
else

View File

@ -529,6 +529,7 @@ begin
if Assigned (s^.outbuf) then
FreeMem(s^.outbuf, Z_BUFSIZE);
FreeMem(s, sizeof(gz_stream));
s := nil;
end;

View File

@ -33,7 +33,7 @@ procedure inflate_blocks_reset (var s : inflate_blocks_state;
c : Pcardinal); { check value on output }
function inflate_blocks_free(s : pInflate_blocks_state;
function inflate_blocks_free(var s : pInflate_blocks_state;
var z : z_stream) : integer;
procedure inflate_set_dictionary(var s : inflate_blocks_state;
@ -103,7 +103,10 @@ begin
if (c <> nil) then
c^ := s.check;
if (s.mode = BTREE) or (s.mode = DTREE) then
begin
freemem(s.sub.trees.blens);
s.sub.trees.blens := nil;
end;
if (s.mode = CODES) then
inflate_codes_free(s.sub.decode.codes, z);
@ -587,6 +590,7 @@ begin
if (t <> Z_OK) then
begin
freemem(s.sub.trees.blens);
s.sub.trees.blens := nil;
r := t;
if (r = Z_DATA_ERROR) then
s.mode := BLKBAD;
@ -707,6 +711,7 @@ begin
((c = 16) and (i < 1)) then
begin
freemem(s.sub.trees.blens);
s.sub.trees.blens := nil;
s.mode := BLKBAD;
z.msg := 'invalid bit length repeat';
r := Z_DATA_ERROR;
@ -741,6 +746,7 @@ begin
1 + ((t shr 5) and $1f),
s.sub.trees.blens^, bl, bd, tl, td, s.hufts^, z);
freemem(s.sub.trees.blens);
s.sub.trees.blens := nil;
if (t <> Z_OK) then
begin
if (t = cardinal(Z_DATA_ERROR)) then
@ -913,13 +919,14 @@ begin
end;
function inflate_blocks_free(s : pInflate_blocks_state;
function inflate_blocks_free(var s : pInflate_blocks_state;
var z : z_stream) : integer;
begin
inflate_blocks_reset(s^, z, nil);
freemem(s^.window);
freemem(s^.hufts);
dispose(s);
s := nil;
{$IFDEF ZLIB_DEBUG}
Trace('inflate: blocks freed');
{$ENDIF}

View File

@ -25,7 +25,7 @@ function inflate_codes(var s : inflate_blocks_state;
var z : z_stream;
r : integer) : integer;
procedure inflate_codes_free(c : pInflate_codes_state;
procedure inflate_codes_free(var c : pInflate_codes_state;
var z : z_stream);
implementation
@ -575,10 +575,11 @@ begin
end;
procedure inflate_codes_free(c : pInflate_codes_state;
procedure inflate_codes_free(var c : pInflate_codes_state;
var z : z_stream);
begin
dispose(c);
c := nil;
{$IFDEF ZLIB_DEBUG}
Tracev('inflate: codes free');
{$ENDIF}

View File

@ -184,7 +184,7 @@ begin
allocate_new_datablock := ldi;
end;
procedure free_datablock(ldi: linkedlist_datablock_internal_ptr);
procedure free_datablock(var ldi: linkedlist_datablock_internal_ptr);
var
ldinext: linkedlist_datablock_internal_ptr;
begin
@ -686,6 +686,7 @@ begin
err := add_data_in_datablock(@zi^.central_dir, zi^.ci.central_header, longint(zi^.ci.size_centralheader));
FreeMem(zi^.ci.central_header);
zi^.ci.central_header := nil;
if (err = ZIP_OK) then
begin

View File

@ -56,7 +56,7 @@ type
Tcompressionstream=class(Tcustomzlibstream)
private
function ClearOutBuffer: Integer;
procedure ClearOutBuffer;
protected
raw_written,compressed_written: int64;
public
@ -206,13 +206,12 @@ begin
get_compressionrate:=100*compressed_written/raw_written;
end;
Function TCompressionstream.ClearOutBuffer : Integer;
procedure TCompressionstream.ClearOutBuffer;
begin
{ Flush the buffer to the stream and update progress }
Result:=source.write(Fbuffer^,bufsize);
inc(compressed_written,Result);
source.writebuffer(Fbuffer^,bufsize-Fstream.avail_out);
inc(compressed_written,bufsize-Fstream.avail_out);
progress(self);
{ reset output buffer }
Fstream.next_out:=Fbuffer;
@ -235,13 +234,7 @@ begin
raise Ecompressionerror.create(zerror(err));
until false;
if Fstream.avail_out<bufsize then
begin
source.writebuffer(FBuffer^,bufsize-Fstream.avail_out);
inc(compressed_written,bufsize-Fstream.avail_out);
progress(self);
Fstream.next_out:=Fbuffer;
Fstream.avail_out:=bufsize;
end;
ClearOutBuffer;
end;
@ -271,7 +264,7 @@ begin
else
err:=inflateInit(Fstream);
if err<>Z_OK then
raise Ecompressionerror.create(zerror(err));
raise Edecompressionerror.create(zerror(err));
end;
function Tdecompressionstream.read(var buffer;count:longint):longint;

View File

@ -1183,10 +1183,10 @@ begin
if OpCode in [opCmpEq, opCmpNe] then
if Length(WideString(Left)) <> Length(WideString(Right)) then
Exit(-1);
Result := WideCompareStr(
Result := sign(WideCompareStr(
WideString(Left),
WideString(Right)
);
));
end;
@ -1204,10 +1204,10 @@ begin
if OpCode in [opCmpEq, opCmpNe] then
if Length(AnsiString(Left)) <> Length(AnsiString(Right)) then
Exit(-1);
Result := CompareStr(
Result := sign(CompareStr(
AnsiString(Left),
AnsiString(Right)
);
));
end;

View File

@ -100,11 +100,11 @@ type
ncb_post: TNcbPost; // POST routine address
ncb_lana_num: UCHAR; // lana (adapter) number
ncb_cmd_cplt: UCHAR; // 0xff => commmand pending
{$IFDEF _WIN64}
{$IFDEF WIN64}
ncb_reserve: array [0..17] of Char; // reserved, used by BIOS
{$ELSE}
ncb_reserve: array [0..9] of Char; // reserved, used by BIOS
{$ENDIF _WIN64}
{$ENDIF WIN64}
ncb_event: HANDLE; // HANDLE to Win32 event which
// will be set to the signalled
// state when an ASYNCH command

View File

@ -3974,7 +3974,7 @@ type
TMoveFileData = MOVE_FILE_DATA;
PMoveFileData = PMOVE_FILE_DATA;
{$IFDEF _WIN64}
{$IFDEF WIN64}
//
// 32/64 Bit thunking support structure
@ -3994,7 +3994,7 @@ type
TMoveFileData32 = MOVE_FILE_DATA32;
PMoveFileData32 = PMOVE_FILE_DATA32;
{$ENDIF _WIN64}
{$ENDIF WIN64}
//
// Structures for FSCTL_FIND_FILES_BY_SID
@ -4221,7 +4221,7 @@ type
TMarkHandleInfo = MARK_HANDLE_INFO;
PMarkHandleInfo = PMARK_HANDLE_INFO;
{$IFDEF _WIN64}
{$IFDEF WIN64}
//
// 32/64 Bit thunking support structure
@ -4238,7 +4238,7 @@ type
TMarkHandleInfo32 = MARK_HANDLE_INFO32;
PMarkHandleInfo32 = PMARK_HANDLE_INFO32;
{$ENDIF _WIN64}
{$ENDIF WIN64}
//
// Flags for the additional source information above.

View File

@ -66,11 +66,11 @@ uses
* Ensure structures are packed consistently.
*)
{$IFDEF _WIN64}
{$IFDEF WIN64}
{$ALIGN OFF}
{$ELSE}
{$ALIGN ON}
{$ENDIF _WIN64}
{$ENDIF WIN64}
const
WSPDESCRIPTION_LEN = 255;
@ -457,7 +457,7 @@ type
{$EXTERNALSYM LPWSCENUMPROTOCOLS}
TWscEnumProtocols = LPWSCENUMPROTOCOLS;
{$IFDEF _WIN64}
{$IFDEF WIN64}
//
// 64-bit architectures capable of running 32-bit code have
@ -468,7 +468,7 @@ type
function WSCEnumProtocols32(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW; lpdwBufferLength: LPDWORD; lpErrno: PINT): Integer; stdcall;
{$EXTERNALSYM WSCEnumProtocols32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
function WSCDeinstallProvider(const lpProviderId: TGUID; var lpErrno: Integer): Integer; stdcall;
{$EXTERNALSYM WSCDeinstallProvider}
@ -478,12 +478,12 @@ type
{$EXTERNALSYM LPWSCDEINSTALLPROVIDER}
TWscDeinstallProvider = LPWSCDEINSTALLPROVIDER;
{$IFDEF _WIN64}
{$IFDEF WIN64}
function WSCDeinstallProvider32(lpProviderId: PGUID; lpErrno: PINT): Integer; stdcall;
{$EXTERNALSYM WSCDeinstallProvider32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
function WSCInstallProvider(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
lpProtocolInfoList: LPWSAPROTOCOL_INFOW; dwNumberOfEntries: DWORD; var lpErrno: Integer): Integer; stdcall;
@ -495,7 +495,7 @@ type
{$EXTERNALSYM LPWSCINSTALLPROVIDER}
TWscInstallProvider = LPWSCINSTALLPROVIDER;
{$IFDEF _WIN64}
{$IFDEF WIN64}
//
// This API manipulates 64-bit and 32-bit catalogs simulteneously.
@ -507,7 +507,7 @@ function WSCInstallProvider64_32(lpProviderId: PGUID; lpszProviderDllPath: PWCHA
dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
{$EXTERNALSYM WSCInstallProvider64_32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
function WSCGetProviderPath(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
var lpProviderDllPathLen, lpErrno: Integer): Integer; stdcall;
@ -519,12 +519,12 @@ type
{$EXTERNALSYM LPWSCGETPROVIDERPATH}
TWscGetProviderPath = LPWSCGETPROVIDERPATH;
{$IFDEF _WIN64}
{$IFDEF WIN64}
function WSCGetProviderPath32(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProviderDllPathLen: PINT; lpErrno: PINT): Integer; stdcall;
{$EXTERNALSYM WSCGetProviderPath32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
function WSCUpdateProvider(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
@ -535,13 +535,13 @@ type
dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
{$EXTERNALSYM LPWSCUPDATEPROVIDER}
{$IFDEF _WIN64}
{$IFDEF WIN64}
function WSCUpdateProvider32(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
{$EXTERNALSYM WSCUpdateProvider32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
function WSCInstallQOSTemplate(const Guid: TGUID; QosName: LPWSABUF; Qos: LPQOS): Integer; stdcall;
{$EXTERNALSYM WSCInstallQOSTemplate}
@ -632,12 +632,12 @@ function WPUCloseThread(lpThreadId: LPWSATHREADID; lpErrno: PINT): Integer; stdc
//#define WSCEnumNameSpaceProviders WSAEnumNameSpaceProvidersW
//#define LPFN_WSCENUMNAMESPACEPROVIDERS LPFN_WSAENUMNAMESPACEPROVIDERSW
{$IFDEF _WIN64}
{$IFDEF WIN64}
function WSCEnumNameSpaceProviders32(lpdwBufferLength: LPDWORD; lpnspBuffer: LPWSANAMESPACE_INFOW): Integer; stdcall;
{$EXTERNALSYM WSCEnumNameSpaceProviders32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
function WSCInstallNameSpace(lpszIdentifier, lpszPathName: LPWSTR; dwNameSpace,
dwVersion: DWORD; const lpProviderId: TGUID): Integer; stdcall;
@ -649,12 +649,12 @@ type
{$EXTERNALSYM LPWSCINSTALLNAMESPACE}
TWscInstallNamespace = LPWSCINSTALLNAMESPACE;
{$IFDEF _WIN64}
{$IFDEF WIN64}
function WSCInstallNameSpace32(lpszIdentifier, lpszPathName: LPWSTR; dwNameSpace, dwVersion: DWORD; lpProviderId: PGUID): Integer; stdcall;
{$EXTERNALSYM WSCInstallNameSpace32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
function WSCUnInstallNameSpace(const lpProviderId: TGUID): Integer; stdcall;
{$EXTERNALSYM WSCUnInstallNameSpace}
@ -664,12 +664,12 @@ type
{$EXTERNALSYM LPWSCUNINSTALLNAMESPACE}
TWscUninstallNamespace = LPWSCUNINSTALLNAMESPACE;
{$IFDEF _WIN64}
{$IFDEF WIN64}
function WSCUnInstallNameSpace32(lpProviderId: PGUID): Integer; stdcall;
{$EXTERNALSYM WSCUnInstallNameSpace32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
function WSCEnableNSProvider(const lpProviderId: TGUID; fEnable: BOOL): Integer; stdcall;
{$EXTERNALSYM WSCEnableNSProvider}
@ -679,12 +679,12 @@ type
{$EXTERNALSYM LPWSCENABLENSPROVIDER}
TWscEnableNsProvider = LPWSCENABLENSPROVIDER;
{$IFDEF _WIN64}
{$IFDEF WIN64}
function WSCEnableNSProvider32(lpProviderId: PGUID; fEnable: BOOL): Integer; stdcall;
{$EXTERNALSYM WSCEnableNSProvider32}
{$ENDIF _WIN64}
{$ENDIF WIN64}
(*
* Pointers to the individual entries in the namespace proc table.
@ -810,7 +810,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCEnumProtocols32: Pointer;
@ -825,7 +825,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
var
_WSCDeinstallProvider: Pointer;
@ -840,7 +840,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCDeinstallProvider32: Pointer;
@ -855,7 +855,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
var
_WSCInstallProvider: Pointer;
@ -870,7 +870,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCInstallProvider64_32: Pointer;
@ -885,7 +885,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
var
_WSCGetProviderPath: Pointer;
@ -900,7 +900,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCGetProviderPath32: Pointer;
@ -915,7 +915,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
var
_WSCUpdateProvider: Pointer;
@ -930,7 +930,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCUpdateProvider32: Pointer;
@ -945,7 +945,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
var
_WSCInstallQOSTemplate: Pointer;
@ -973,7 +973,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCEnumNameSpaceProviders32: Pointer;
@ -988,7 +988,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
var
_WSCInstallNameSpace: Pointer;
@ -1003,7 +1003,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCInstallNameSpace32: Pointer;
@ -1018,7 +1018,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
var
_WSCUnInstallNameSpace: Pointer;
@ -1033,7 +1033,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCUnInstallNameSpace32: Pointer;
@ -1048,7 +1048,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
var
_WSCEnableNSProvider: Pointer;
@ -1063,7 +1063,7 @@ begin
end;
end;
{$IFDEF _WIN64}
{$IFDEF WIN64}
var
_WSCEnableNSProvider32: Pointer;
@ -1078,7 +1078,7 @@ begin
end;
end;
{$ENDIF _WIN64}
{$ENDIF WIN64}
{$ELSE}
@ -1092,7 +1092,7 @@ function WSCRemoveQOSTemplate; external qosname name 'WSCRemoveQOSTemplate';
function WSCInstallNameSpace; external ws2_32 name 'WSCInstallNameSpace';
function WSCUnInstallNameSpace; external ws2_32 name 'WSCUnInstallNameSpace';
function WSCEnableNSProvider; external ws2_32 name 'WSCEnableNSProvider';
{$IFDEF _WIN64}
{$IFDEF WIN64}
function WSCEnumProtocols32; external ws2_32 name 'WSCEnumProtocols32';
function WSCDeinstallProvider32; external ws2_32 name 'WSCDeinstallProvider32';
function WSCInstallProvider64_32; external ws2_32 name 'WSCInstallProvider64_32';
@ -1102,7 +1102,7 @@ function WSCEnumNameSpaceProviders32; external ws2_32 name 'WSCEnumNameSpaceProv
function WSCInstallNameSpace32; external ws2_32 name 'WSCInstallNameSpace32';
function WSCUnInstallNameSpace32; external ws2_32 name 'WSCUnInstallNameSpace32';
function WSCEnableNSProvider32; external ws2_32 name 'WSCEnableNSProvider32';
{$ENDIF _WIN64}
{$ENDIF WIN64}
{$ENDIF DYNAMIC_LINK}

View File

@ -130,6 +130,8 @@ type
function Floor : TPoint;
function Round : TPoint;
function Length : Single;
class function Create(const ax, ay: Single): TPointF; overload; static; inline;
class function Create(const apt: TPoint): TPointF; overload; static; inline;
class operator = (const apt1, apt2 : TPointF) : Boolean;
class operator <> (const apt1, apt2 : TPointF): Boolean;
class operator + (const apt1, apt2 : TPointF): TPointF;
@ -662,6 +664,17 @@ begin
x:=ax; y:=ay;
end;
class function TPointF.Create(const ax, ay: Single): TPointF;
begin
Result.x := ax;
Result.y := ay;
end;
class function TPointF.Create(const apt: TPoint): TPointF;
begin
Result.x := apt.X;
Result.y := apt.Y;
end;
{ TRectF }
function TRectF.GetHeight: Single;