pygame   documentation
||  Home  ||  Help Contents  ||
 
|| pygame || cdrom || constants || cursor || display || draw ||
|| event || font || image || joystick || key || mixer ||
|| mixer_music || mouse || movie || sndarray || surfarray || time ||
|| transform ||
 
|| CD || Channel || Clock || Font || Joystick || Movie ||
|| Overlay || Rect || Sound || Surface ||
 
|| color || cursors || sprite ||

pygame.draw

Contains routines to draw onto a surface.
 
Note that all drawing routines use direct pixel access, so the surfaces must be locked for use. The draw functions will temporarily lock the surface if needed, but if performing many drawing routines together, it would be best to surround the drawing code with a lock/unlock pair.
aaline - draw a line on a surface
aalines - draw multiple connected anti-aliased lines on a surface
arc - draw an elliptic arc on a surface
circle - draw a circle on a surface
ellipse - draw an ellipse on a surface
line - draw a line on a surface
lines - draw multiple connected lines on a surface
polygon - draws a polygon on a surface
rect - draws a rectangle on a surface

aaline
pygame.draw.aaline(Surface, color, startpos, endpos, blend=1) -> Rect
 
aalines
pygame.draw.aalines(Surface, color, closed, point_array, blend=1) -> Rect
 
arc
pygame.draw.arc(Surface, color, Rect, angle_start, angle_stop, width=0) -> Rect
 
circle
pygame.draw.circle(Surface, color, pos, radius, width=0) -> Rect
 
ellipse
pygame.draw.ellipse(Surface, color, Rect, width=0) -> Rect
 
line
pygame.draw.line(Surface, color, startpos, endpos, width=1) -> Rect
 
lines
pygame.draw.lines(Surface, color, closed, point_array, width=1) -> Rect
 
polygon
pygame.draw.polygon(Surface, color, pointslist, width=0) -> Rect
 
rect
pygame.draw.rect(Surface, color, Rect, width=0) -> Rect