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

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

Parameters

Name Explanation
DeviceValue The device context or the raster image data (Depends on the DeviceMode)
PrintRect A structure containing the coordinates for the starting point (left,top) and the ending point (right,bottom) of the line
DrawInfo A structure whose member variables contain the drawing information
DeviceMode The designated object where the line is drawn (0: Screen, 1: Printer, 2: Image data)

Return Value

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

Explanation

The IKLine function draws a line in the designated object (the screen, printer, or image data). The line is drawn from the PrintRect top, left coordinates (starting point) to the PrintRect bottom right coordinates (ending point). Note: The ending point is not included in the line. The line is drawn from the value set in the DrawInfo PenStyle member variable. This member variable must be set. When drawing a line, it is recommended that the PenWidth, PenMode, PenColor, Transparent, and BackColor member variables also be set. BackColor is enabled when the Transparent is set to False and the pen is set to draw lines other than solid lines.

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
IK5Line: DeviceValue, PrintRect, PrintInfo
IKLine: DeviceValue, PrintRect, DrawInfo, DeviceMode

PrintInfo and DrawInfo structures are different, however the member variables in PrintInfo are used in the same way in DrawInfo. The DeviceMode parameter has been added to this function in the ImageKit6 and ImageKit10. In the ImageKit5 this was set separately using the IKSetDeviceMode function. 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. By setting the Transparent parameter to True, there is no difference between this function in the ImageKit6 and ImageKit10.

 

The ImageKit10 VCL is a product created by Newtone Corporation