Changeset 345 for trunk/Geometry.pas
- Timestamp:
- Dec 23, 2024, 11:25:36 AM (8 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Geometry.pas
r317 r345 96 96 constructor Create(const Points: TPointArray); overload; 97 97 constructor Create(const Rect: TGRect<T>); overload; 98 function Compare(Polygon: TGPolygon<T>): Boolean; 98 99 procedure Move(P: T); 99 100 function GetRect: TGRect<T>; … … 239 240 Self.Points[2] := Rect.P2; 240 241 Self.Points[3] := T.Create(Rect.P1.X, Rect.P2.Y); 242 end; 243 244 function TGPolygon<T>.Compare(Polygon: TGPolygon<T>): Boolean; 245 var 246 I: Integer; 247 begin 248 Result := Length(Points) = Length(Polygon.Points); 249 if not Result then Exit; 250 for I := 0 to Length(Points) - 1 do 251 if Points[I] <> Polygon.Points[I] then begin 252 Result := False; 253 Break; 254 end; 241 255 end; 242 256
Note:
See TracChangeset
for help on using the changeset viewer.