This method draws a rectangle in the designated object (screen, printer, image data).

[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Rectangle(NativeUInt DeviceValue, int ALeft, int ATop, int ARight, int ABottom, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Rectangle(NativeUInt DeviceValue, const TRect &ARect, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Rectangle(void * DeviceValue, int ALeft, int ATop, int ARight, int ABottom, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Rectangle(void * DeviceValue, const TRect &ARect, TVIkOutPutDeviceMode DeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Rectangle(DeviceValue: THandle; ALeft, ATop, ARight, ABottom: Integer; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Rectangle(DeviceValue: THandle; const ARect: TRect; Integer; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Rectangle(DeviceValue: Pointer; ALeft, ATop, ARight, ABottom: Integer; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Rectangle(DeviceValue: Pointer; const ARect: TRect; Integer; DeviceMode: TVIkOutPutDeviceMode)

[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
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 Rectangle will be drawn in pixel units. If vikPrinter, the Rectangle will be drawn in 0.1mm units. If vikMemoryHandle, the Rectangle will be drawn (in pixel units) to the image data

Use either ALeft, ATop, ARight, ABottom or ARect.

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The Rectangle method draws a rectangle in the designated object (screen, printer, image data). The ALeft, ATop, ARight, and ABottom parameters define the coordinates specifying the rectangle. The outline of the rectangle is drawn from the value set in the PenStyle property and the rectangle is filled by the value set in the BrushStyle property. When drawing a rectangle, it is recommended that the PenWidth, PenMode, PenColor, BrushColor, Transparent, and BackColor properties also be set. The BackColor property is enabled when the Transparent property is False and the pen is solid or the brush is hatch pattern.

If the DeviceMode parameter is vikScreen or vikMemoryHandle then ALeft, ATop, ARight, ABottom parameters are in pixel units.

If the DeviceMode parameter is vikPrinter then ALeft, ATop, ARight, ABottom parameters are in 0.1mm units.

Differences between the ImageKit7/8/9/10

In VCL the constants contain a "v". In ActiveX, the constants are: ikScreen, ikPrinter, ikMemoryHandle.
Methods that pass a TRect type have been added.

 

The ImageKit10 VCL is a product created by Newtone Corporation