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.
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 |
In Visual Basic 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.
In \Visual Basic 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.