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.
[TVIkPaintMode Type]
Unit
IkInit
type
TVIkPaintMode = (vikBorder,
vikSurface);
[TVIkOutPutDeviceMode Type]
Unit
IkInit
type
TVIkOutPutDeviceMode = (vikScreen,
vikPrinter, vikMemoryHandle);
Parameters
Name | Explanation |
---|---|
DeviceValue | The device context or the raster image data depending on the DeviceMode |
x, y | The x and y coordinates of the point |
Color1 | The color that is replaced or the color that defines the area to be filled by Color2 |
Color2 | The color that replaces Color1 |
PaintMode | The mode used to paint |
DeviceMode | If vikScreen, then the x,y parameters will be in pixel units. If vikPrinter, the x, y parameters will be in 0.1mm units. If vikMemoryHandle, the x,y parameters will be in pixel units and painted to the image data according to the DeviceValue parameter |
Return Value
Returns True if successful. Returns False 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 vikBorder:
Starting from the coordinates specified by the x and y parameters, the Paint method uses the Color1 as a boundary and fills the area inside (or outside) that boundary with the Color2.
When the PaintMode is vikSurface:
Starting from the coordinates specified by the x and y parameters, the Paint method fills the Color1 area with the Color2.
The following constants can be used: (vikBorder, vikSurface).
The Color1 and Color2 parameters can be set using color constants (clRed, etc.) or RGB(red, green, blue) values.
If the DeviceMode parameter is vikScreen or vikMemoryHandle then the x and y parameters are in pixel units.
If the DeviceMode parameter is vikPrinter then x and y parameters are in 0.1mm units.
Differences between the ImageKit7/8/9
In VCL the constants contain a "v". In ActiveX, the constants are: vikBorder, vikSurface, ikScreen, ikPrinter, ikMemoryHandle.