Prints a line at specified coordinates. Unlike iNewLine, the end of the line is squared (instead of being rounded).

The print is not started (only iEndPrinting can be used to start the print).

Remark: The origin (0,0) is located in the top left corner of the sheet. It takes the physical margins of printer into account.

Only the horizontal and vertical lines can be printed. The lines will be printed only if the printer supports this feature. See Characteristics of a print on Pocket PC for more details.

Versions 18 and later

This function is now available for iPhone/iPad applications.

New in version 18

This function is now available for iPhone/iPad applications.

This function is now available for iPhone/iPad applications.

Versions 19 and later

This function is now available for Android applications.

This function is now available in Android Widget mode.

New in version 19

This function is now available for Android applications.

This function is now available in Android Widget mode.

This function is now available for Android applications.

This function is now available in Android Widget mode.

Versions 21 and later

This function is now available in Universal Windows 10 App mode.

New in version 21

This function is now available in Universal Windows 10 App mode.

This function is now available in Universal Windows 10 App mode.

Example

// Draws a line across the page width // Thickness: 2.5 Pica iLine(10, 10, 30, 25, 2.5) iEndPrinting()

Horizontal coordinate of the beginning of line (in millimeters). Value included between 0 and the page width (returned by iPageWidth).

Only the horizontal and vertical lines can be printed. Therefore, <X1> must be equal to <X2>. Otherwise, print problems may occur.

<Y1>: Real

Vertical coordinate of the beginning of line (in millimeters). Value included between 0 and the page height (returned by iPageHeight).

Only the horizontal and vertical lines can be printed. Therefore, <Y1> must be equal to <Y2>. Otherwise, print problems may occur.

<X2>: Real

Horizontal coordinate of the end of line (in millimeters). Value included between 0 and the page width (returned by iPageWidth).

Only the horizontal and vertical lines can be printed. Therefore, <X1> must be equal to <X2>. Otherwise, print problems may occur.

<Y2>: Real

Vertical coordinate of the end of line (in millimeters). Value included between 0 and the page height (returned by iPageHeight).

Only the horizontal and vertical lines can be printed. Therefore, <Y1> must be equal to <Y2>. Otherwise, print problems may occur.

<Thickness>: Optional real

Line thickness (in picas). Default value = 1 (one Pica = 0.353 mm). To get a thickness of 1 pixel, <Thickness> must be equal to 0. When the thickness increases, it is proportionally distributed between the two sides of line.

Only the horizontal and vertical lines can be printed. Therefore, <X1> must be equal to <X2> or <Y1> must be equal to <Y2>. Otherwise, print problems may occur.

<Color>: Optional integer

Color used for the line. If this parameter is not specified, the color used is black. This color can correspond to:

This parameter always corresponds to a solid line. If one of the constants corresponding to the other types of lines is used, this constant will be ignored.

Remarks

The cursor position is not modified when the outline is drawn.

A dotted line (iDotted) or a mixed line (iDotAndDash) combined with a thick line may produce unpleasant effects.