* Add ColorToRGB class var to TColorRec

(cherry picked from commit f253ca856f)
This commit is contained in:
Michaël Van Canneyt 2023-11-01 23:30:26 +01:00 committed by marcoonthegit
parent c85439dab0
commit d3288ef976

View File

@ -31,6 +31,7 @@ Type
TImageIndex = type Integer;
TColorRec = record
class var ColorToRGB: function (Color: TColor): Longint;
class operator := (AColor : TColor): TColorRec; inline;
class operator := (AColor : TColorRec): TColor; inline;
const
@ -981,4 +982,11 @@ begin
CR.B:=CC(B);
end;
function DefaultColorToRGB(Color: TColor): Longint;
begin
Result:=Color;
end;
initialization
TColorRec.ColorToRGB:=@DefaultColorToRGB;
end.