This method sets a color in the specified pixel in the designated object (screen, or image data).
[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
In VCL the constants contain a "v". In ActiveX, the constants are: ikScreen, ikPrinter, ikMemoryHandle.