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

[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->SetPixel(NativeUInt DeviceValue, int X, int Y, TColor AColor, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->SetPixel(void * DeviceValue, int X, int Y, TColor AColor, TVIkOutPutDeviceMode DeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.SetPixel(DeviceValue: THandle; X, Y: Integer; AColor: TColor; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.SetPixel(DeviceValue: Pointer; X, Y: Integer; AColor: TColor; DeviceMode: TVIkOutPutDeviceMode)

[TVIkOutPutDeviceMode Type]

Unit
     IkInit

type
     TVIkOutPutDeviceMode = (vikScreen, vikPrinter, vikMemoryHandle);

Parameters

Name Explanation
DeviceValue The device context or the raster image data
x,y The x,y coordinates of the pixel
AColor The new color of the pixel
DeviceMode The designated object where the pixel color is set (vikScreen: Screen, vikMemoryHandle: Image memory handle)

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The SetPixel method sets a color specified by the AColor parameter into the pixel whose coordinates are specified by the x and y parameters. To set the AColor parameter, use color constants (clRed, etc.) or RGB(red, green, blue) values. If the specified color can not be accurately produced by the device, the nearest color is used.

This method can draw in the following designated objects: screen and image data. This method is enabled when the DeviceMode parameter is vikScreen or vikMemoryHandle (the designated object is the screen or the image data). Please set the x and y parameters in pixel units.

Differences between the ImageKit7/8/9/10

In VCL the constants contain a "v". In ActiveX, the constants are: ikScreen, ikPrinter, ikMemoryHandle.

 

The ImageKit10 VCL is a product created by Newtone Corporation