

The first and last points in the points sequence ParametersĬolor ( Color or int or tuple ( int, int, int, )) - color to draw with, the alpha value is optional if using aĬlosed ( bool) - if True an additional line segment is drawn between

For thick lines the ends are squared off.ĭrawing thick lines with sharp corners can have undesired looking results. Lines(surface, color, closed, points, width=1) -> Rectĭraws a sequence of contiguous straight lines on the given surface. (optional) used for setting the value of bottom right

If you don't set this value, it will use the border_radius value.īorder_top_right_radius ( int) - (optional) used for setting the value of top rightīorder_bottom_left_radius ( int) - (optional) used for setting the value of bottom left The supported range is, with 0 representing a rectangleīorder_top_left_radius ( int) - (optional) used for setting the value of top leftīorder. Which had half the width spill outside the rect area.īorder_radius ( int) - (optional) used for drawing rectangle with rounded corners. Rect's area, rather than using an internal call to draw.lines(), Changed in pygame 2.1.1: Drawing rects with width now draws the width correctly inside the
