Skip to main content

Color

ARGB layout matches Wayland argb8888.
Color.parseHex accepts #RGB, #RGBA, #RRGGBB, #RRGGBBAA, and named colors.

Surface

Pixel buffer with drawing primitives:
subSurface returns a clipped view into a parent buffer. blitRowsVertical(dst_y, src_y, height) moves full-width physical pixel rows inside a surface. It handles overlapping ranges, stride, and clipping. otter-term uses it to scroll existing pixels before redrawing exposed rows.

HiDPI

Set scale on CommandList when recording logical coordinates for rasterization.

When to draw directly

Prefer CommandList and quad_renderer for app UI. Direct Surface calls still make sense in tests, one-off buffers, and legacy widget draw methods.