Kolor ? Jak zamienić kolory delfi na np RGB?
np: chciałbym zamienić Szejp1.Brush.Color [$00AFAFAF] na RGB, ale nie mogę się do tego odwoła, znaczy się nie wiem jak... :-/
0
0
Użyj funkcji:
getrvalue()
getbvalue()
getgvalue()
:)
--
Delphi 6
Pozdrówka
0
var
Kolor : TColor;
R,G,B : Integer;
begin
Kolor := clRed;
R := GetRValue(Kolor);
G := GetGValue(Kolor);
B := GetBValue(Kolor);
ShowMessage('RGB: ' + IntToStr(R) +', '+ IntToStr(G) +', '+ IntToStr(B));
end;
jezeli nie zrozumialem pytanka to przepraszam ;)
--
-[ Delphi 3, 6 ]-[ [email protected] ]
0
Bez użycia funkcji:
var r,g,b:byte;
c : TColor;
begin
c := Szejp1.Brush.Color;
r := c and $ff;
g := (c shr 8) and $ff;
b := (c shr 16) and $ff;
Caption := IntToStr(r) + ' ' +IntToStr(g) + ' ' +IntToStr(b);
end;
--
"Imagination is more important than knowledge." - A. Einstein