api-overview.md
August 20, 2026 · View on GitHub
pygraphics extends framebuf with extra drawing helpers (rounded rectangles, gradients, polygons) and returns Area bounding boxes for partial updates.
See the installation guide for MIP and TestPyPI options.
Narrative docs
- Graphics guide — quick start, FrameBuffer vs Draw, Area bounds, font rendering patterns, loaders
- Graphics files — image loaders, the save/load matrix, and BMP565
Key entry points
pygraphics.FrameBuffer— subclass of the bundledpygraphics.framebuf.FrameBufferwith shape helpers and Area returns (same implementation on every interpreter)pygraphics.Draw— draws on any framebuf-compatible canvaspygraphics.Area— dirty rectangle with union/clip helpers- Module functions —
circle,rect,text8, … (same primitives as FrameBuffer) pygraphics.Font— romfont renderer; built-in embedded fonts or optional.binpath (Fonts)load_image,save_image— auto-detect load / format-aware savebmp_to_framebuffer,pbm_to_framebuffer,pgm_to_framebuffer— image loadersBMP565— sliceable/streaming RGB565 BMP asset
Generated API pages for each module appear below (build time).