TAChart: Add operator+ for TDoublePoint and operator- for TPoint

git-svn-id: trunk@24336 -
This commit is contained in:
ask 2010-04-01 10:47:13 +00:00
parent a48e7d5758
commit 55e3c12e7d

View File

@ -191,7 +191,9 @@ procedure UpdateMinMax(AValue: Double; var AMin, AMax: Double);
operator +(const A: TPoint; B: TSize): TPoint; overload; inline;
operator +(const A, B: TPoint): TPoint; overload; inline;
operator =(const A, B: TMethod): Boolean;
operator +(const A, B: TDoublePoint): TDoublePoint; overload; inline;
operator - (const A, B: TPoint): TPoint; overload; inline;
operator =(const A, B: TMethod): Boolean; overload; inline;
implementation
@ -514,6 +516,18 @@ begin
Result.Y := A.Y + B.Y;
end;
operator + (const A, B: TDoublePoint): TDoublePoint;
begin
Result.X := A.X + B.X;
Result.Y := A.Y + B.Y;
end;
operator - (const A, B: TPoint): TPoint;
begin
Result.X := A.X - B.X;
Result.Y := A.Y - B.Y;
end;
operator = (const A, B: TMethod): Boolean;
begin
Result := (A.Code = B.Code) and (A.Data = B.Data);