.Line Method

Top  Previous  Next

Function:

Draws a line.

Syntax:

lcd.line(x1 as word,y1 as word, x2 as word, y2 as word)

Returns:

---

See Also:

Lines, Rectangles, and Fills, lcd.rectangle, lcd.filledrectangle, lcd.fill

 


Part

Description

x1

X coordinate of the first point. Value range is 0 to lcd.width-1.

y1

Y coordinate of the first point. Value range is 0 to lcd.height-1.

x2

X coordinate of the second point. Value range is 0 to lcd.width-1.

y2

Y coordinate of the second point. Value range is 0 to lcd.height-1.

Details

The line is drawn with the specified line width (lcd.linewidth) and "pen" color (lcd.forecolor). Drawing horizontal (lcd.horline) or vertical (lcd.verline) lines is more efficient than drawing generic lines, and should be used whenever possible.

The display panel must be enabled (lcd.enabled= 1- YES) for this method to work.