feat(canvas): introduce canvas geometry and rendering helpers

- Added new files `canvas_geometry.cc`, `canvas_geometry.h`, `canvas_rendering.cc`, and `canvas_rendering.h` to encapsulate canvas geometry calculations and rendering logic.
- Refactored `Canvas::DrawBackground` and related methods to utilize the new geometry and rendering helpers, improving code organization and readability.
- Introduced `CanvasState` to consolidate canvas state management, gradually replacing scattered state members.

Benefits:
- Enhances maintainability and clarity of canvas-related code.
- Streamlines rendering operations and geometry calculations, improving overall performance and usability.
This commit is contained in:
scawful
2025-10-16 12:37:13 -04:00
parent 4ba507bde5
commit bfad2f91fb
8 changed files with 735 additions and 65 deletions

View File

@@ -29,9 +29,11 @@ set(CANVAS_SRC
app/gui/canvas/canvas.cc
app/gui/canvas/canvas_automation_api.cc
app/gui/canvas/canvas_context_menu.cc
app/gui/canvas/canvas_geometry.cc
app/gui/canvas/canvas_interaction_handler.cc
app/gui/canvas/canvas_modals.cc
app/gui/canvas/canvas_performance_integration.cc
app/gui/canvas/canvas_rendering.cc
app/gui/canvas/canvas_usage_tracker.cc
app/gui/canvas/canvas_utils.cc
)