Skip to main content

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​

ClassSummary
CanvasA 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.
FontA TrueType / OpenType font loaded from raw file bytes. Pass to Canvas.DrawText to render strings at any pixel size.
ImageA decoded image, ready to blit into a Canvas. Decoding (JPEG / PNG / BMP / GIF / TGA) happens once at Load.
ColorA 32-bit color with 8 bits each of alpha, red, green, blue.

Enum-like​

ClassSummary
PixelFormatPixel layout of a Canvas buffer.