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

[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Line(NativeUInt DeviceValue, int ALeft, int ATop, int ARight, int ABottom, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Line(NativeUInt DeviceValue, const TRect &ARect, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Line(void * DeviceValue, int ALeft, int ATop, int ARight, int ABottom, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Line(void * DeviceValue, const TRect &ARect, TVIkOutPutDeviceMode DeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Line(DeviceValue: THandle; ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Line(DeviceValue: THandle; const ARect: TRect; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Line(DeviceValue: Pointer; ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Line(DeviceValue: Pointer; const ARect: TRect; 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 x and y coordinates of the starting point of the line
ARight, ABottom x and y coordinates of the ending point of the line
ARect The x, y coordinates of the rectangle bounding the starting point and ending point of the line
DeviceMode If vikScreen, then the line will be drawn in pixel units. If vikPrinter, the line will be drawn in 0.1mm units. If vikMemoryHandle, the line 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 Line method draws a line in the designated object (the screen, printer, or image memory handle). The line is drawn from the top, left coordinates (starting point) to the bottom right coordinates (ending point) or from the top left corner to the bottom right corner of ARect. Note: The ending point is not included in the line. This method can draw in the following designated objects: screen, printer, and memory handle. The line is drawn from the value set in the PenStyle property. This property must be set. When drawing a line, it is recommended that the PenWidth , PenMode, PenColor, Transparent, and BackColor properties also be set. The BackColor property is enabled when the Transparent property is False and the pen is solid.

If the DeviceMode parameter is vikScreen or vikMemoryHandle then the left, top, right, bottom parameters will be in pixel units.

If the DeviceMode parameter is vikPrinter then the left, top, right, bottom parameters will be 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