diff --git a/components/industrialstuff/source/switches.pas b/components/industrialstuff/source/switches.pas index 592419a41..fd7abd559 100644 --- a/components/industrialstuff/source/switches.pas +++ b/components/industrialstuff/source/switches.pas @@ -18,7 +18,7 @@ unit Switches; interface uses - LCLIntf, LCLType, LMessages, + LCLIntf, LCLType, LMessages, LCLVersion, Graphics, GraphType, Classes, SysUtils, Types, Controls, ExtCtrls, ImgList; type @@ -244,6 +244,17 @@ begin end; end; +{$IF LCL_FullVersion < 3000000} +function RotatePoint(const APoint: TPoint; AAngle: Double): TPoint; +var + sa, ca: Double; +begin + SinCos(AAngle, sa, ca); + Result.X := Round( ca * APoint.X + sa * APoint.Y); + Result.Y := Round(-sa * APoint.X + ca * APoint.Y); +end; +{$ENDIF} + procedure RotateImage(Img: TFPCustomImage; Angle: Double); var Buffer: TFPCustomImage;