Starting from a specified point in the designated object, this method 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.

[Visual Basic]   [ Boolean = ]imagekitcontrolname.PrintDraw.Paint(DeviceValue As LONG_PTR, x As Long, y As Long, FColor As Long, TColor As Long, PaintMode As PaintModeConstants, DeviceMode As OutPutDeviceModeConstants)
[Visual C++]     [ BOOL = ]imagekitcontrolname.GetPrintDraw().Paint(LONG_PTR DeviceValue, long x, long y, unsigned long FColor, unsigned long TColor, long PaintMode, long DeviceMode)
[VB.NET]   [ Boolean = ]imagekitcontrolname.PrintDraw.Paint(DeviceValue As Integer(x86) or Long(x64), x As Integer, y As Integer, FColor As UInteger, TColor As UInteger, PaintMode As ImageKit10(A)Lib.PaintModeConstants, DeviceMode As ImageKit10(A)Lib.OutPutDeviceModeConstants)
[C#.NET]   [ bool = ]imagekitcontrolname.PrintDraw.Paint(int(x86) or long(x64) DeviceValue, int x, int y, uint FColor, uint TColor, ImageKit10(A)Lib.PaintModeConstants PaintMode, ImageKit10(A)Lib.OutPutDeviceModeConstants DeviceMode)

* ImageKit10ALib refers to the ANSI version, ImageKit10Lib refers to the Unicode version, (x86) refers to the 32 bit version, and (x64) refers to the 64 bit version.

Parameters

Name Explanation
DeviceValue The device context or the raster image data (i.e. Hdc or ImageHandle) depending on the DeviceMode
x,y The x and y coordinates of the 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 If 0 (ikScreen), then the x,y parameters will be in pixel units. If 1 (ikPrinter), the x,y parameters will be in 0.1mm units. If 2 (ikMemoryHandle), the x,y parameters will be in pixel units and painted to the image data according to the DeviceValue parameter

The following constants can be used: (ikScreen = 0, ikPrinter = 1, ikMemoryHandle = 2).

Return Value

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

Explanation

Starting from a specified point in the designated object, the Paint method 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 Paint method 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 Paint method fills the FColor area with the Tcolor.

The following constants can be used: (ikBorder = 0, ikSurface = 1).


The FColor and TColor parameters can be set using RGB(red,green,blue) values.


If the DeviceMode parameter is 0 or 2 then the x and y parameters are in pixel units.

If the DeviceMode parameter is 1 then x and y parameters are in 0.1mm units.

Differences between the ImageKit7/8

The DeviceValue, FColor, and TColor arguments' type has changed.

The ImageKit10 ActiveX is a product created by Newtone Corporation