mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 12:09:48 +02:00
* Add ColorToRGB class var to TColorRec
(cherry picked from commit f253ca856f
)
This commit is contained in:
parent
c85439dab0
commit
d3288ef976
@ -31,6 +31,7 @@ Type
|
|||||||
TImageIndex = type Integer;
|
TImageIndex = type Integer;
|
||||||
|
|
||||||
TColorRec = record
|
TColorRec = record
|
||||||
|
class var ColorToRGB: function (Color: TColor): Longint;
|
||||||
class operator := (AColor : TColor): TColorRec; inline;
|
class operator := (AColor : TColor): TColorRec; inline;
|
||||||
class operator := (AColor : TColorRec): TColor; inline;
|
class operator := (AColor : TColorRec): TColor; inline;
|
||||||
const
|
const
|
||||||
@ -981,4 +982,11 @@ begin
|
|||||||
CR.B:=CC(B);
|
CR.B:=CC(B);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function DefaultColorToRGB(Color: TColor): Longint;
|
||||||
|
begin
|
||||||
|
Result:=Color;
|
||||||
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
TColorRec.ColorToRGB:=@DefaultColorToRGB;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user