Registriert seit: 23. Jan 2008
3.686 Beiträge
Delphi 2007 Enterprise
|
AW: RGB -- TColor allgemeine Verständnisfrage
28. Dez 2010, 19:48
Dann doch gleich so:
Delphi-Quellcode:
Type
TColorAcc = packed record
case Boolean of
true: Color: TColor;
false:
begin
Alpha: Byte;
Blue: Byte;
Green: Byte;
Red: Byte;
end;
end;
procedure Beispiel;
var
C:TColorAcc;
begin
c.Color := clBlue;
c.Red := 255;
// c.Color=clFuchsia
end;
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)
|