Board index » cppbuilder » Reading and writing pixels

Reading and writing pixels


2004-02-25 02:11:56 AM
cppbuilder40
I'm looking for a method for reading and writing pixels on a
Canvas. The area is only 200X200 pixels so I would like to avoid
using ScanLine. A small bit of code would be of great help.
TY
AL
 
 

Re:Reading and writing pixels

Quote
I'm looking for a method for reading and writing pixels on
a
Canvas. The area is only 200X200 pixels so I would like to
avoid
using ScanLine. A small bit of code would be of great
help.
If I understood correctly, use the Pixels property of
TCanvas:
__property TColor Pixels[int X][int Y] = {read=GetPixel,
write=SetPixel};
Example:
MyCanvas->Pixels[5][7] = clRed;
HTH,
Steve.