Implement Phase 5: stroke-level eraser

- Eraser mode: stylus touch/drag hit-tests against stroke bounding boxes
  expanded by 42pt radius (~3.5mm), processes historical points
- Deletes hit strokes from canvas view and Room DB
- Backing bitmap rebuilt automatically on stroke removal

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 14:36:35 -07:00
parent 3fc9751fc4
commit 7cf779934d
5 changed files with 74 additions and 7 deletions

View File

@@ -71,10 +71,10 @@ completed and log them in PROGRESS.md.
## Phase 5: Eraser
- [ ] 5.1: Eraser mode in `CanvasState`
- [ ] 5.2: Hit testing — bounding box pre-filter + point distance
- [ ] 5.3: Stroke deletion + backing bitmap rebuild
- **Verify:** `./gradlew test` + manual test
- [x] 5.1: Eraser mode in `CanvasState` (already defined in Phase 3)
- [x] 5.2: Hit testing — bounding box pre-filter (expanded by 42pt radius)
- [x] 5.3: Stroke deletion + backing bitmap rebuild + DB sync
- **Verify:** `./gradlew build` — PASSED. Manual test pending.
## Phase 6: Undo/Redo