TIvoryBitmap::ScanLine

Provides indexed access to each line of pixels.

__property void* ScanLine[int Row];

Description

Use ScanLine to alter the bitmap image pixel by pixel. This is the fastest way of changing a pixel in a bitmap. ScanLine returns a pointer to the beginning of the line indexed by Row. Row is zero-based, 0 means the top line. Each line consists of an array of pixel colors. A pixel color is an 8-bit value that addresses a color in the palette. So you should cast the pointer returned by ScanLine to unsigned char*, like this:

(unsigned char*)ScanLine[Row] + Column = PixelColor;

Notes

The ScanLine property appeared in C++Builder 3.0. ScanLine in TIvoryBitmap works very much like the ScanLine in TBitmap, except that TIvoryBitmap supports the use of the ScanLine property even in C++Builder 1.0.

Back to TIvoryBitmap