feat(pipeline): add Canvas and FontStage for rendering

- Add Canvas class for 2D surface management
- Add CanvasStage for pipeline integration
- Add FontStage as Transform for font rendering
- Update Camera with x, y, w, h, zoom and guardrails
- Add get_dimensions() to Display protocol
This commit is contained in:
2026-03-16 15:39:54 -07:00
parent 76126bdaac
commit bfd94fe046
3 changed files with 271 additions and 4 deletions

View File

@@ -67,6 +67,18 @@ class Display(Protocol):
"""Shutdown display."""
...
def get_dimensions(self) -> tuple[int, int]:
"""Get current terminal dimensions.
Returns:
(width, height) in character cells
This method is called after show() to check if the display
was resized. The main loop should compare this to the current
viewport dimensions and update accordingly.
"""
...
class DisplayRegistry:
"""Registry for display backends with auto-discovery."""