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

[C++Builder]     BOOL IKRectangle(LPVOID DeviceValue, LPRECT PrintRect, PTR_IKPRINT_DRAWINFO DrawInfo, BYTE DeviceMode);
[Delphi]         function IKRectangle(DeviceValue: THandle; var PrintRect: TRect; var DrawInfo: IKPRINT_DRAWINFO; DeviceMode: Byte): LongBool;

Parameters

Name Explanation
DeviceValue The device context or the raster image data (depending on the DeviceMode)
PrintRect Structure containing the coordinates of points for the rectangle
DrawInfo Structure whose members set the drawing information
DeviceMode The designated object where the rectangle is drawn (0: Screen, 1: Printer, 2: Image data)

Return Value

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

Explanation

The IKRectangle function draws a rectangle in the designated object (screen, printer, image data). The PrintRect member variables define the coordinates specifying the rectangle. The outline of the rectangle is drawn from the value set in the PenStyle member variable of the DrawInfo structure and the rectangle is filled by the value set in the BrushStyle member variable. When drawing a rectangle, it is recommended that the PenWidth, PenMode, PenColor, BrushColor, Transparent and BackColor member variables also be set. The BackColor is enabled when the Transparent is set to False and the pen is set to draw lines other than solid lines or the brush is set to draw hatch pattern.

This function can draw in the following designated objects: screen, printer, and image data.

If the DeviceMode parameter is 0 or 2 (the designated object is the screen or the image data) then the PrintRect member variables are in pixel units.

If the DeviceMode parameter is 1 (the designated object is the printer) then the PrintRect member variables are in 0.1mm units.

The differences from the ImageKit5

Name Explanation
IK5Rectangle: DeviceValue, PrintRect, PrintInfo
IKRectangle: DeviceValue, PrintRect, DrawInfo, DeviceMode

PrintInfo and DrawInfo structures are different, however the member variables in PrintInfo are used in the same way in DrawInfo. If you set the Transparent parameter to True and then set the DeviceMode parameter to the value that you used in the ImageKit5 IKSetDeviceMode, then there is no difference between this function in the ImageKit10 and the ImageKit5.

The differences from the ImageKit6

BackColor has been added. If you set the Transparent parameter to True, there is no difference between this function in the ImageKit10 and the ImageKit6.

 

The ImageKit10 VCL is a product created by Newtone Corporation