Extract canvas projection helpers and thin preview and node loading

This commit is contained in:
2026-06-16 18:16:04 +02:00
parent 1442c13dd7
commit 8906756d12
11 changed files with 565 additions and 341 deletions

View File

@@ -79,16 +79,16 @@ What is still carrying too much live ownership:
Current hotspot files:
- `src/canvas.cpp`: 2645 lines
- `src/canvas.cpp`: 2728 lines
- `src/app_layout.cpp`: 125 lines
- `src/canvas_modes.cpp`: 1798 lines
- `src/node.cpp`: 1594 lines
- `src/node.cpp`: 1465 lines
- `src/main.cpp`: 271 lines
- `src/node_panel_brush.cpp`: 1197 lines
- `src/node_stroke_preview.cpp`: 890 lines
- `src/node_panel_brush.cpp`: 1207 lines
- `src/node_stroke_preview.cpp`: 910 lines
- `src/node_canvas.cpp`: 852 lines
- `src/app.cpp`: 502 lines
- `src/app_dialogs.cpp`: 142 lines
- `src/app.cpp`: 575 lines
- `src/app_dialogs.cpp`: 168 lines
Current architecture mismatches that must be treated as real blockers:
@@ -240,10 +240,17 @@ Current architecture mismatches that must be treated as real blockers:
`src/node_stroke_preview.cpp`, while the immediate preview pass-sequencing
family inside `draw_stroke_immediate()` now also routes through
`NodeStrokePreview::execute_stroke_draw_immediate_pass_sequence(...)`, while
`Node` child attach/detach/reorder operations now route through named local
helpers in `src/node.cpp`, which makes the scene-graph mutation paths easier
to reason about without yet reducing the file or moving ownership into
`pp_ui_core`.
preview stroke preparation, dual-brush setup, and live pass-orchestration
request assembly now also route through retained preview execution helpers,
while `Node` child attach/detach/reorder operations now route through named
local helpers in `src/node.cpp`, and `Node::load_internal(...)` child XML
loading now also routes through `src/legacy_ui_node_loader.*`, which makes
the scene-graph mutation and child-instantiation paths easier to reason
about without yet reducing the file or moving ownership into `pp_ui_core`,
while `Canvas` point-trace/unproject/project/camera push-pop-get-set and
face-to-shape helpers now also route through
`src/legacy_canvas_projection_services.*` instead of staying inline in
`src/canvas.cpp`.
- Modern C++23 usage exists in extracted components, especially `std::span`,
explicit result/status objects, and a few concepts, but the live app still
does not consistently express ownership, thread affinity, or renderer