This method draws a filled rectangle in the designated object (the screen, printer, or image data).
[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 parameter |
ALeft, ATop | The x, y coordinates of the top left corner of the rectangle |
ARight, ABottom | The x, y coordinates of the bottom right corner of the rectangle |
ARect | The x, y coordinates of the rectangle |
DeviceMode | If vikScreen, then the output will be drawn in pixel units. If vikPrinter, the output will be drawn in 0.1mm units. If vikMemoryHandle, the output will be drawn (in pixel units) to the image data according to the DeviceValue parameter |
Use either ALeft, ATop, ARight, ABottom or ARect.
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The FillRect method draws a filled rectangle in the designated object (the screen, printer, or image data). The (ALeft, ATop), and (ARight, ABottom) parameters are coordinates for points that specify the rectangle. The rectangle is filled by the value set in the BrushStyle property.
Note that the left and top sides are included in the filled rectangle but the right and bottom sides are not (This method can draw in the following designated objects: screen, printer, and memory handle).
It is recommended that the BrushColor, Transparent, and BackColor property also be set. The BackColor property is enabled when the Transparent property is false and the pen is set to draw lines other than solid lines or the brush is set to draw hatch pattern. With the FillRect method, when the Transparent property is True and a hatch pattern is selected, the spaces between the lines will be filled with the default color and will NOT be transparent. To make the space between the lines of the hatch pattern transparent, please use the Rectangle method instead.
If the DeviceMode parameter is vikScreen or vikMemoryHandle, then the ALeft, ATop, ARight, ABottom, (or ARect), X1, Y1, X2, Y2 parameters are in pixel units.
If the DeviceMode parameter is vikPrinter, then the ALeft, ATop, ARight, ABottom, (or ARect), X1, Y1, X2, Y2 parameters are in 0.1mm units.
Differences between the ImageKit7/8/9
In VCL the constants contain a "v". In ActiveX, the constants
are: ikScreen, ikPrinter, ikMemoryHandle.
Methods that pass a TRect type have been added.