Draw: Ink to Shape converts pen strokes into shapes

Draw > Ink to Shape recognises each pen stroke on the slide's ink layer
as a line, rectangle, oval or isosceles triangle (apex up or down) and
replaces it with that preset shape, outlined in the stroke's colour and
width with no fill. Strokes it can't recognise, and highlighter strokes,
stay ink. The ink shape is removed once it has no strokes left. The
whole conversion is one undo step.

The recogniser (engine/src/inkshape.rs) is pure geometry: ends meeting,
area covered within the bounding box, and spread from the fitted
ellipse. Ribbon big buttons now carry an accessibility label.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Nikita Rakitin
2026-10-13 23:16:49 +03:00
co-authored by Cursor
parent 457406a7a5
commit 4658042de8
7 changed files with 354 additions and 5 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ The summary between `<!-- SUMMARY -->
|---|---|---|---|---|---|
| P0 | 72 | 61 | 11 | 0 | 92% |
| P1 | 65 | 38 | 21 | 6 | 75% |
| P2 | 54 | 13 | 15 | 26 | 38% |
| P2 | 54 | 13 | 16 | 25 | 39% |
| Area | Parity |
|---|---|
@@ -31,7 +31,7 @@ The summary between `<!-- SUMMARY -->
| Animations | 79% |
| Slide show | 66% |
| Review | 60% |
| Draw | 33% |
| Draw | 50% |
| Undo & clipboard | 88% |
| Automation (✱) | 100% |
| Platforms (✱) | 67% |
@@ -224,7 +224,7 @@ Open P0 items: Contextual tabs (Shape Format, Picture Format, Table Design/Layou
| Review | Compare presentations | P2 | M |
| Review | Track changes / version history | P2 | M |
| Draw | Ink pens, highlighter, eraser | P1 | P |
| Draw | Ink to shape / text | P2 | M |
| Draw | Ink to shape / text | P2 | P |
| Undo & clipboard | Unlimited undo/redo | P0 | D |
| Undo & clipboard | Cut, copy, paste shapes and slides | P0 | D |
| Undo & clipboard | Paste special (keep formatting, picture, text only) | P1 | P |