drawLine

drawLine(x1:    Integer;
         y1:    Integer;
         x2:    Integer;
         y2:    Integer;
         color: Integer);

The drawLine method of the Printer class draws a line on the printer page, by using a colored pen the width of the drawWidth property and the style of the drawStyle property.

An exception is raised if this method is invoked from a server method.

The drawLine method parameters are listed in the following table.

Parameter Description
x1, y1 Left and top start points of the line, respectively
x2, y2 Right and bottom end points of the line, respectively
color Color of the pen used

All of the positional values are relative to the left and top margins, and need not lie within the page.

The line drawn by this method extends up to but does not include the end point.

This method causes the header frame to be printed if the method is called at the start of a new page. The method has no subsequent affect on the current print position.

For details about placing output directly on a printer page at any location without the use of frames and drawing rotated text and characters, see "Free-Format Printing", later in this chapter.