pygame documentation |
||
Pygame Home ||
Help Contents ||
Reference Index ||
Camera || Cdrom || Color || Cursors || Display || Draw || Event || Examples || Font || Gfxdraw || Image || Joystick || Key || Locals || Mask || Midi || Mixer || Mouse || Movie || Music || Overlay || Pixelarray || Pygame || Rect || Scrap || Sndarray || Sprite || Surface || Surfarray || Tests || Time || Transform |
pygame.gfxdraw.pixel - place a pixel | place a pixel |
pygame.gfxdraw.hline - draw a horizontal line | draw a horizontal line |
pygame.gfxdraw.vline - draw a vertical line | draw a vertical line |
pygame.gfxdraw.rectangle - draw a rectangle | draw a rectangle |
pygame.gfxdraw.box - draw a box | draw a box |
pygame.gfxdraw.line - draw a line | draw a line |
pygame.gfxdraw.circle - draw a circle | draw a circle |
pygame.gfxdraw.arc - draw an arc | draw an arc |
pygame.gfxdraw.aacircle - draw an anti-aliased circle | draw an anti-aliased circle |
pygame.gfxdraw.filled_circle - draw a filled circle | draw a filled circle |
pygame.gfxdraw.ellipse - draw an ellipse | draw an ellipse |
pygame.gfxdraw.aaellipse - draw an anti-aliased ellipse | draw an anti-aliased ellipse |
pygame.gfxdraw.filled_ellipse - draw a filled ellipse | draw a filled ellipse |
pygame.gfxdraw.pie - draw a pie | draw a pie |
pygame.gfxdraw.trigon - draw a triangle | draw a triangle |
pygame.gfxdraw.aatrigon - draw an anti-aliased triangle | draw an anti-aliased triangle |
pygame.gfxdraw.filled_trigon - draw a filled trigon | draw a filled trigon |
pygame.gfxdraw.polygon - draw a polygon | draw a polygon |
pygame.gfxdraw.aapolygon - draw an anti-aliased polygon | draw an anti-aliased polygon |
pygame.gfxdraw.filled_polygon - draw a filled polygon | draw a filled polygon |
pygame.gfxdraw.textured_polygon - draw a textured polygon | draw a textured polygon |
pygame.gfxdraw.bezier - draw a bezier curve | draw a bezier curve |
Wraps SDL_gfx primatives.
EXPERIMENTAL!: meaning this api may change, or dissapear in later pygame releases. If you use this, your code will break with the next pygame release.
Most of the functions accept a color argument that is an RGB triplet. These can also accept an RGBA quadruplet. The color argument can also be an integer pixel value that is already mapped to the Surface's pixel format.
For all functions the arguments are strictly positional. Only integers are accepted for coordinates and radii.
For functions like rectangle that accept a rect argument any (x, y, w, h) sequence is accepted, though pygame.Rect instances are prefered. Note that for a pygame.Rect the drawing will not include Rect.bottomright. The right and bottom attributes of a Rect lie one pixel outside of the Rect's boarder.
New in pygame 1.9.0.
A per-pixel alpha texture blit to a per-pixel alpha surface will differ from a Surface.blit - draw one image onto another blit. Also, a per-pixel alpha texture cannot be used with an 8-bit per pixel destination.