Drawing shapes

Pygame can draw basic shapes onto Surfaces. It will always respect clipping area and will return rectangle that contain changed pixels.

pygame.draw.rect

pygame.draw.rect(Surface, color, Rect, width=0) draws rectangle shape.

pygame.draw.polygon

pygame.draw.polygon(Surface, color, pointlist, width=0) draw a shape with any number of sides

pygame.draw.circle

pygame.draw.circle(Surface, color, pos, radius, width=0) draw a circle around a point.The width argument is the thickness to draw the outer edge

pygame.draw.ellipse

pygame.draw.ellipse(Surface, color, Rect, width=0) draw a round shape inside a rectangle

pygame.draw.arc

pygame.draw.arc(Surface, color, Rect, start_angle, stop_angle, width=1) draw a partial section of an ellipse

pygame.draw.line

pygame.draw.line(Surface, color, start_pos, end_pos, width=1) draw a straight line segment

pygame.draw.lines

pygame.draw.lines(Surface, color, closed, pointlist, width=1) draw multiple contiguous line segments

pygame.draw.aaline

pygame.draw.aaline(Surface, color, startpos, endpos, blend=1) draw fine antialiased lines

pygame.draw.aalines

pygame.draw.aalines(Surface, color, closed, pointlist, blend=1) pygame.draw.aalines(Surface, color, closed, pointlist, blend=1)

I want explain them more cause they behave like those you've learned on math lessons.