[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppVclTColor
A TColor red, green and blue values can be obtained using GetRValue, GetGValue and GetBValue respectively.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppVclTColor
(C++ VCL) TColor
A data type holding a color. Use the RGB macro to convert three unsigned chars to their TColor value.
//Plain use
Form1->Color = clLime;
//Using RGB macro
const int maxx = PaintBox1->Width;
const int maxy = PaintBox1->Height;
for (int y = 0; y != maxy; ++y)
{
for (int x = 0; x != maxx; ++x)
{
PaintBox1->Canvas->Pixels[x][y] = RGB(x,y,x+y);
}
}
A TColor red, green and blue values can be obtained using GetRValue, GetGValue and GetBValue respectively.
'TColor' links
- C++ Builder
- C++ CLX
- Pascal VCL
- Pascal CLX
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
