Pixel(X: Integer, Y: Integer): IGxColor;
X is the X coordinate.
Y is the Y coordinate.
The Pixel property determines a color of the separate pixel of a bitmap. Pixel coordinates are passed by the X, Y parameters.
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: