TCustomBitmap32.Pixel

property Pixel[X, Y: Integer]: TColor32; default;

property PixelS[X, Y: Integer]: TColor32;

property PixelW[X, Y: Integer]: TColor32;

property PixelX[X, Y: TFixed]: TColor32;

property PixelXS[X, Y: TFixed]: TColor32;

property PixelXW[X, Y: TFixed]: TColor32;

property PixelF[X, Y: Single]: TColor32;

property PixelFS[X, Y: Single]: TColor32;

property PixelFW[X, Y: Single]: TColor32;

Description

Pixel property sets the value of the pixel in the bitmap. Reading it, will return the color value of the pixel located at specified coordinates. This property does not validate the specified coordinates, so use it only then you are completely sure that you are not trying to read from or write to the outside of the bitmap boundary. Pixel is declared as default property, you may use it as shown below:

Bitmap32[10, 20] := Bitmap32[20, 10]; // copy a pixel from (20,10) to (10,20) position

PixelS is a 'safe' version of the Pixel property. When reading pixels from the outside the bitmap boundary, the value specified by OuterColor is returned. Writing with invalid coordinates will have no effect.

PixelW is the wrapping version of the Pixel property. When reading pixels from outside the bitmap boundary, the value returned is determined by the currently selected WrapMode. Thus always safe.

PixelX provides a method for accessing the pixels in fixed-point coordinates. The returned color is computed by performing linear interpolation on four adjacent pixels. Similarly, when pixels are set, they are antialiased.

PixelXS is a 'safe' version of the above property.

PixelXW is a wrapping version of the property PixelX.

PixelF is similar to PixelX but works with floating point coordinates instead of fixed point.

PixelFS is a 'safe' version of the above property.

PixelFW is a wrapping version of the above property.

See Also

Naming Conventions, SetPixel, OuterColor, WrapMode, Color Types, TFixed