IGxBitmap.Pixel

Syntax

Pixel(X: Integer, Y: Integer): IGxColor;

Parameters

X is the X coordinate.

Y is the Y coordinate.

Description

The Pixel property determines a color of the separate pixel of a bitmap. Pixel coordinates are passed by the X, Y parameters.

Example

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Image: IGxBitmap;

Color: IGxColor;

Begin

Image:=GxBitmap.CreateNew(640,480,0 As GxPixelFormat);

Color:=Image.Pixel(10,10);

End Sub Button1OnClick;

After executing the example clicking the button creates a bitmap with the 640*480 resolution, and the Color variable contains the color of the pixel with the 10.10 coordinates.

See also:

IGxBitmap