Skip to content

Auto shapes: a box drawn with the pen becomes a box (FL-93) - #97

Merged
raj-khan merged 1 commit into
mainfrom
fl-93-auto-shapes
Sep 30, 2026
Merged

raj-khan merged 1 commit into
mainfrom
fl-93-auto-shapes

Conversation

@raj-khan

Copy link
Copy Markdown
Owner

FL-93. With the pen, a rectangle, an ellipse or a diamond drawn by hand becomes a clean process, start / end or decision where it was drawn, in the pen colour, with its title ready to type.

  • src/domain/recognize.js: a geometric recognizer, written from scratch (the same measures PaleoSketch and Xournal++ build on; no model, no dependency). It resamples the stroke, checks it closes and goes all the way round, and fits it against each outline in its own box. It also reads straight lines and one-stroke arrows (head at either end or both), which FL-94 will use.
  • Scribbles, curves, handwriting, small marks and rings drawn round an existing shape stay strokes.
  • The toast offers Keep as drawn; Auto shapes is a remembered toggle in the pen toolbar, on by default.

Tests: 332 unit, 152 e2e, all passing.

🤖 Generated with Claude Code

A stroke plainly drawn as a rectangle, ellipse or diamond becomes a process,
start / end or decision, recognised by geometry with no new dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raj-khan
raj-khan merged commit eced3e7 into main Sep 30, 2026
3 checks passed
@raj-khan
raj-khan deleted the fl-93-auto-shapes branch September 30, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant