Canvas Camera
Canvas is a camera-aware facade over U8g2. Apps draw in content coordinates, and the camera converts them to screen coordinates before calling U8g2.
A scrollable App
1 | class LongPage final : public IApplication { |
When useVerticalScroll is enabled, unconsumed UP/DOWN events move the camera by one viewport. An App with its own selection model can call ensureCanvasVisible(), scrollCanvasTo(), or animateCanvasTo().
Canvas transforms coordinate-based U8g2 APIs. Fixed headers, Popups, and Focus overlays drawn directly through getU8G2() are unaffected by the camera. ViewManager saves y position and content height by App stack depth, so the previous scroll position can be restored after the upper App exits.
