Browse Source

Add TSizeF.Zero for Delphi compatibility

Bi0T1N 3 days ago
parent
commit
477da86f77
1 changed files with 7 additions and 0 deletions
  1. 7 0
      rtl/objpas/types.pp

+ 7 - 0
rtl/objpas/types.pp

@@ -243,6 +243,7 @@ type
 
           class function Create(const ax, ay: Single): TSizeF; overload; static; inline;
           class function Create(const asz: TSize): TSizeF; overload; static; inline;
+          class function Zero: TSizeF; static;
           class operator = (const asz1, asz2 : TSizeF) : Boolean;
           class operator <> (const asz1, asz2 : TSizeF): Boolean;
           class operator + (const asz1, asz2 : TSizeF): TSizeF;
@@ -1570,6 +1571,12 @@ begin
   Result.y := asz.cy;
 end;
 
+class function TSizeF.Zero: TSizeF;
+begin
+  Result.cx := 0.0;
+  Result.cy := 0.0;
+end;
+
 class function TSizeF.Create(const ax, ay: Single): TSizeF;
 begin
   Result.cx := ax;