Starting from a specified point in the designated object, this function can fill an existing color with a different color. It can also use an existing color as a boundary and paint all other colors inside (or outside) that boundary with a different color.
Parameters
Name | Explanation |
---|---|
DeviceValue | The device context or the raster image data (Depends on the DeviceMode) |
x,y | The x and y coordinates of the starting point |
FColor | The color that is replaced or the color that defines the area to be filled by Tcolor |
TColor | The color that replaces FColor |
PaintMode | The mode used to paint (either Border or Surface) |
DeviceMode | The designated object where the paint occurs (0: Screen, 1: Printer, 2: Image data) |
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
Starting from a specified point in the designated object, the IKPaint function can fill an existing color with a different color. It can also use an existing color as a boundary and paint all other colors inside (or outside) that boundary with a different color.
When the PaintMode is 0: (Border)
Starting from the coordinates specified by the x and y parameters, the IKPaint function uses the FColor as a boundary and fills the area inside (or outside) that boundary with the TColor.

When the PaintMode is 1: (Surface)
Starting from the coordinates specified by the x and y parameters, the IKPaint function fills the FColor area with the Tcolor.

The IKPaint function can draw in the following designated objects: screen, printer, and image data. The FColor and TColor parameters can be set using RGB(red,green,blue) values.
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.
If the DeviceMode parameter is 1 (the designated object is the printer) then the x and y parameters are in 0.1mm units.
The differences from the ImageKit5
Name | Explanation |
---|---|
IK5Paint: | DeviceValue, x, y, FColor, TColor |
IKPaint: | DeviceValue, x, y, FColor, TColor, PaintMode, DeviceMode |
If you set the DeviceMode parameter to the value that you used in the ImageKit5 IKSetDeviceMode, then there is no difference between this function in the ImageKit10 and the ImageKit5.