RpPrinter:DrawLine() Method

<< Click to Display Table of Contents >>

Navigation:  RpPrinter & PtrDevice Class Overview > RpPrinter Class >

RpPrinter:DrawLine() Method

Previous pageReturn to chapter overviewNext page

Purpose

To draw a line on the printer or print preview window.

Syntax

<oRpPrinter>:DrawLine([nFromY], [nFromX], [nToY], [nToX],

[nLineThickness], [nLineStyle], [oColor])

Arguments

nFromY

Optional.  The starting row of the line.  The default is the current PROW setting.

nFromX

Optional. The starting column of the line.  The default is the current PCOL setting.

nToY

Optional.  The ending row of the line.  The default is the current PROW setting.

nToX

Optional.  The ending column of the line.  The default is the current PCOL setting.

nLineThickness

Optional.  The thickness of the line (in pixels).  The default is 1.

nLineStyle

Optional.  The style of the line.  Valid settings are the same as the Windows pen styles:  PS_SOLID, PS_DASH, PS_DASHDOT, PS_DASHDOTDOT, PS_DOT.  The default is PS_SOLID.

oColor

 Optional.  Color object for setting the line color.  The default is Color{COLORBLACK}.

Example

// Draw a line 5 units lone

nPCol := oRpPrinter:PCol

oRpPrinter:DrawLine(, , , nPCol+5)