This function sets a color in the specified pixel in the designated object. (screen, or image data).

[C++Builder]     BOOL IKSetPixel(LPVOID DeviceValue, int x, int y, COLORREF Color);
[Delphi]         function IKSetPixel(DeviceValue: THandle; x, y: Integer; Color:COLORREF): LongBool;

Parameters

Name Explanation
DeviceValue The device context or the raster image data (Depends on the DeviceMode)
x,y The x,y coordinates of the pixel
Color The new color of the pixel
DeviceMode The designated object (0: Screen, 2: Image data)

Return Value

Returns True (nonzero) if successful. Returns False (0) if unsuccessful.

Explanation

The IKSetPixel function sets the color specified by the Color parameter into the pixel whose coordinates are specified by the x and y parameters. To set the Color parameter, use the RGB(red, green, blue) value. If the specified color can not be accurately produced by the device, the nearest color is used.

This function can draw in the following designated objects: screen and image data.

If the DeviceMode parameter is 0 or 2 (the designated object is the screen or the image data) then the x and y parameters are in pixel units.

 

The differences from the ImageKit5

Function Name Parameters
IK5SetPixel: DeviceValue, x, y, Red, Green, Blue
IKSetPixel: DeviceValue, x, y, Red, Green, Blue, DeviceMode

If you pass the value of the IK5SetDeviceMode to the DeviceMode parameter then there are no differences between in the IK5 and Ik10.

 

The ImageKit10 VCL is a product created by Newtone Corporation