<<

Contents

Search

>>

 

LPDRAWLINE

 

 

Function

 

 

Syntax:

LPDRAWLINE(<Type>, <From Y-position>, <From X-position>, <To Y-position>, <To X-position>, <Width>, <Red>, <Green>, <Blue> [,<Report>])

 

<Type>

= <NUM-EXPRESSION>

<From Y-position>

= <NUM-EXPRESSION>

<From X-position>

= <NUM-EXPRESSION>

<To Y-position>

= <NUM-EXPRESSION>

<To X-position>

= <NUM-EXPRESSION>

<Width>

= <NUM-EXPRESSION>

<Red>

= <NUM-EXPRESSION>

<Green>

= <NUM-EXPRESSION>

<Blue>

= <NUM-EXPRESSION>

<Report>

= <NUM-EXPRESSION>

 

 

Meaning:

Draws a line on the print document in the color <Red>,<Green>,<Blue>.

 

<Type> defines the measure for the parameters <From Y-Position>,<From X-Position>,<To Y-Position> and <To X-Position>.

 

Type

Measure

1

TWIPS (1 TWIP = 1/20 point)

2

point (1 point = 1/72 inch)

3

millimeter

otherwise

Grid coordinates (Lines/Columns)

 

If <Report> <> 0 and LPDRAWLINE is executed during a report, the number of the current line of the report (this is LINES + 1) is added to <From Y-position> and <To Y-position>. This can be used to draw lines in the current line of a report. When a macro of a report is executed  LINES + 1 contains always the number of the current print line. However this number can change later, e.g. if at the end of the data block it has become apperent that a group change has occured.

 

This function only has a meaning with ENABLE LPGDI.

 

LPDRAWLINE returns the result –1 with DISABLE LPGDI, otherwise 1.

 

Parameter:

Type

Defines the measure for <From Y-Position>,<From X-Position>,<To Y-Position> and <To X-Position>.

From Y-position

Starting point Y-coordinate

From X-position

Starting point X-coordinate

To Y-position

Endpoint Y-coordinate

To X-position

Endpoint X-coordinate

Width

Width of line in TWIPS

Red

Red value

Green

Green value

Blue

Blue value

Report

If <> 0 and a report is executed the number of the current line of the report (this is LINES + 1) is added to <From Y-position> and <To Y-position>.

 

Sample:

/* Define grid with 65 lines and 80 columns

LPGRIDSETTING = 65,80

/* Draw a red line from position (5.5,8.25) to (12.7,13.34)

/* with line width = 10 TWIPS

H% = LPDRAWLINE(4,5.5,8.25,12.7,13.34,10,255,0,0)

 

/* Draw a line in the current report line

H% = LPDRAWLINE(4,0,8.25,0,9,10,255,0,0,1)

 

See also:

LPDRAWRECT

LPFILLRECT

LPCIRCLE

LPPOLYGON

DRAWLINE