GHIElectronics.Endpoint.Drawing
Off-screen 2D drawing primitives for Endpoint: Canvas, Color, Font, Image, PixelFormat. Pure pixel drawing, independent of the LVGL-backed UI widget library.
Install:
pip install GHIElectronics.Endpoint.Drawing
Import:
from GHIElectronics.Endpoint.Drawing import Canvas, Color, Font, Image, PixelFormat
Classes
| Class | Summary |
|---|---|
| Canvas | A pixel buffer plus the primitives to draw into it. Pick the size and PixelFormat at Create time; when done, hand Buffer to whichever device accepts bytes. |
| Font | A TrueType / OpenType font loaded from raw file bytes. Pass to Canvas.DrawText to render strings at any pixel size. |
| Image | A decoded image, ready to blit into a Canvas. Decoding (JPEG / PNG / BMP / GIF / TGA) happens once at Load. |
| Color | A 32-bit color with 8 bits each of alpha, red, green, blue. |
Enum-like
| Class | Summary |
|---|---|
| PixelFormat | Pixel layout of a Canvas buffer. |