Draw Arc with Pygame

Drawing arc with Pygame is just like drawing ellipse, the pygame.draw.arc method takes these arguments.

1) The screen surface
2) The color of that arc
3) The rectangle object where the arc will fit into
4) The starting angle of the arc
5) The ending angle of the arc
6) An optional line width of the arc

Below script will draw the arc which will fit in the entire width and height of the screen.

import pygame
from pygame.locals import *
from sys import exit

from math import pi

screen = pygame.display.set_mode((640, 480), 0, 32)

while True:
    for event in pygame.event.get():
        if event.type == QUIT:
    angle = 0.5*pi*2.
    pygame.draw.arc(screen, (0,0,0), (0,0,639,479), 0, angle, 3)

The above script will produce the following outcome.

Pygame arc
Pygame arc