Overview
graphics API reference
Source-linked Python and native C reference for the PyDevices graphics module.
graphics is the all-C drawing module shared by CPython, MicroPython, and CircuitPython builds in the PyDevices stack.
Quick start
from graphics import Area, FrameBuffer, RGB565
buffer = bytearray(160 * 128 * 2)
canvas = FrameBuffer(buffer, 160, 128, RGB565)
changed = canvas.fill_rect(10, 10, 40, 24, 0xF800)
assert changed == Area(10, 10, 40, 24)Reference snapshot
- Release line: v0.0.9
- Source commit:
df47b3926b7c52e7f62eddbbf9dc618d6bbd6b6a - License: MIT
- Adapter: CPython binding tables plus public C headers
- Python API entries indexed: 136
- Native C functions indexed: 61
- Source files represented: 7
- Tracked C and header files in the repository: 31
The generated pages expose the user-facing Python names and the lower-level C entry points used by firmware and extension integrations. Every entry links to the exact source snapshot above.
Browse the reference
- Area and clipping — 26 entries
- FrameBuffer — 31 entries
- Drawing operations — 46 entries
- Fonts and images — 22 entries
- Runtime and pixel formats — 11 entries
- Native drawing and framebuffer API — 34 entries
- Native fonts, images, and runtime API — 27 entries
