TAChart: Add IfThen overload for TObject

git-svn-id: trunk@37527 -
This commit is contained in:
ask 2012-06-05 08:43:35 +00:00
parent e930d4c8e4
commit c0a075c800

View File

@ -267,6 +267,7 @@ procedure Exchange(var A, B: String); overload; inline;
function FormatIfNotEmpty(AFormat, AStr: String): String; inline;
function IfThen(ACond: Boolean; ATrue, AFalse: TObject): TObject; overload;
function InterpolateRGB(AColor1, AColor2: Integer; ACoeff: Double): Integer;
function IntToColorHex(AColor: Integer): String; inline;
function IsNan(const APoint: TDoublePoint): Boolean; overload; inline;
@ -365,6 +366,14 @@ begin
Result := Format(AFormat, [AStr]);
end;
function IfThen(ACond: Boolean; ATrue, AFalse: TObject): TObject;
begin
if ACond then
Result := ATrue
else
Result := AFalse;
end;
function InterpolateRGB(AColor1, AColor2: Integer; ACoeff: Double): Integer;
type
TBytes = packed array [1..4] of Byte;