[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppVclPixels
The code below gives an example to modify individual pixels.
Note it uses the macro RGB. Pixels is not a member of TImage's TCanvas. When working with TImage use ScanLine instead. Using ScanLine is much faster too.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppVclPixels
(C++ VCL) Pixels
Class member of a TCanvas.The code below gives an example to modify individual pixels.
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);
}
}
Note it uses the macro RGB. Pixels is not a member of TImage's TCanvas. When working with TImage use ScanLine instead. Using ScanLine is much faster too.
'Pixels' links
- C++ VCL
- C++ Builder
- Pascal CLX
- Pascal VCL
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
