Extract canvas live stroke, node canvas state, and preset panel UI

This commit is contained in:
2026-06-16 19:53:50 +02:00
parent f78f72b607
commit 9b2a0d9c30
13 changed files with 1107 additions and 807 deletions

View File

@@ -91,7 +91,7 @@ Status: In Progress
Why now:
`src/canvas.cpp` is still the biggest single architectural blocker at about
2122 lines, with `src/canvas_modes.cpp` still large at about 1014 lines.
1490 lines, with `src/canvas_modes.cpp` still large at about 1014 lines.
Current slice:
- Canvas state-management helpers for picking, clear/clear-all, layer
@@ -126,6 +126,10 @@ Current slice:
`src/legacy_canvas_mode_transform.cpp` instead of staying inline in
`src/canvas_modes.cpp`, which materially thins another retained
transform-mode pocket from the broader canvas/render hotspot family.
- The live `Canvas::stroke_draw()` orchestration now also lives in
`src/legacy_canvas_stroke_live_services.cpp` instead of staying inline in
`src/canvas.cpp`, which materially thins another large retained live
stroke-render pocket from the canvas shell.
Write scope:
- `src/canvas.cpp`
@@ -289,6 +293,11 @@ Current slice:
`execute_node_canvas_handle_event(...)` helper, which trims another coherent
input-routing block from `src/node_canvas.cpp` even though the node still
owns broader canvas/controller behavior.
- `NodeCanvas` restore/clear context, resize handling, camera reset, buffer
creation, cursor visibility/update, tick, and destroy ownership now also
live in `src/legacy_node_canvas_state_services.*` instead of staying inline
in `src/node_canvas.cpp`, which materially thins another retained
state/control pocket without reopening the draw path.
Write scope:
- `src/node_stroke_preview.cpp`
@@ -1011,6 +1020,12 @@ Current slice:
in `src/node_panel_brush.cpp`, which trims another large preset-workflow
pocket from the live UI node even though the broader cloud/package worker
split still remains follow-up work.
- `NodePanelBrushPreset` init/menu wiring, click handling, item construction,
and added-state update now also live in
`src/legacy_brush_preset_panel_ui.*` instead of staying inline in
`src/node_panel_brush.cpp`, which materially thins another retained preset
panel UI pocket even though cloud/package worker ownership remains the
follow-up.
Write scope:
- `src/legacy_cloud_services.*`