diff --git a/lcl/extgraphics.pas b/lcl/extgraphics.pas index 0f717a8a33..41bfed649b 100644 --- a/lcl/extgraphics.pas +++ b/lcl/extgraphics.pas @@ -25,7 +25,7 @@ unit extgraphics; interface -uses Classes, LCLProc, Graphics, Math, GraphMath; +uses Types, Classes, LCLProc, Graphics, Math, GraphMath; type TShapeDirection = (atUp, atDown, atLeft, atRight); diff --git a/lcl/graphmath.pp b/lcl/graphmath.pp index b589546b70..53b9dee3d4 100644 --- a/lcl/graphmath.pp +++ b/lcl/graphmath.pp @@ -35,7 +35,7 @@ unit GraphMath; interface Uses - Classes, SysUtils, Math, LCLProc; + Types, Classes, SysUtils, Math, LCLProc; Type TFloatPoint = Record @@ -63,8 +63,6 @@ procedure BezierArcPoints(X, Y, Width, Height : Longint; Angle1, Angle2, function BezierMidPoint(Bezier : TBezier) : TFloatPoint; -function CenterPoint(Rect : TRect) : TPoint; - procedure Coords2Angles(X, Y, Width, Height : Integer; SX, SY, EX, EY : Integer; var Angle1, Angle2 : Extended); @@ -598,38 +596,6 @@ begin Result := (Bezier[0] + 3*Bezier[1] + 3*Bezier[2] + Bezier[3]) / 8; end; -{------------------------------------------------------------------------------ - Method: CenterPoint - Params: Rect - Returns: TPoint - - Use CenterPoint to get the Center-Point of any rectangle. It is primarily - for use with, and in, other routines such as Quadrant, and RadialPoint. - -------------------------------------------------------------------------------} -function CenterPoint(Rect : TRect) : TPoint; -var - Tmp : Longint; -begin - With Rect do begin - - If Right < Left then begin - Tmp := Right; - Right := Left; - Left := Tmp; - end; - - If Bottom < Top then begin - Tmp := Bottom; - Bottom := Top; - Top := Tmp; - end; - - Result.X := Left + (Right - Left) div 2; - Result.Y := Top + (Bottom - Top) div 2; - end; -end; - {------------------------------------------------------------------------------ Method: Coords2Angles Params: x,y,width,height,sx,sy,ex,ey, angle1,angle2