Vertex Docs

VertexScreen.Draw.lines(surface, color, closed, points, width)

Description: Draws a sequence of connected straight lines on the specified surface using a list of points. Each point is connected to the next in order, forming a polyline. When closed is set to True, the final point is automatically connected back to the first, creating a closed outline shape.

Usage

from VertexEngine import VertexScreen

vs = VertexScreen()
points = [(60, 60), (180, 80), (240, 160), (120, 220)]

# Draw a closed shape
vs.Draw.lines(
    surface,
    (255, 255, 255),
    closed=True,
    points=points,
    width=3
)

Parameters

Returns

None — This method draws directly onto the surface and does not return a value.

Notes