# NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

# Reference | line()

Syntax |
    line(x1, y1, x2, y2, draw=True)
Description | Draws a line to the screen. A line is a straight path between two points. The first two parameters set the location of the first point (origin), the following two parameters set the location of the second point (destination). You may not notice a line if the line's stroke() is the same as the background color, or if the line's strokewidth() is zero.
Returns | a path containing the line
Example |
    line(10, 20, 80, 80)