Drawing Canvas: insert a canvas and draw shapes, pictures and text boxes inside it (#344) (#356)

Insert > Illustrations > Shapes > New Drawing Canvas (and Draw > Drawing Canvas)
inserts a 6" x 3" canvas in line with text. While it is selected, Pictures,
Shapes and Text Box put the new object inside it. Fit, Expand and Scale Drawing
change its frame, Shape Fill and Shape Outline colour its background and border,
and canvas.member moves, resizes or removes a member.

The canvas is the group object with a canvas style: its frame is independent of
its members, and members outside it are clipped on screen and in PDF (new
Draw::Clip / Placed::Clip). DOCX reads and writes wpc:wpc with wpc:bg,
wpc:whole and wps:wsp / pic:pic members.

A canvas turns and flips as a whole, like a group (#332): its background,
outline and clipped members are drawn inside its turn (Draw::Rotated around
Draw::Clip; Placed::Clip carries the spin, its members sit in the unturned
frame), and hit testing follows the turned frame. The canvas schema has no
transform of its own, so a turned canvas keeps its rot/flipH/flipV as an
a:xfrm in a wpc:extLst extension (urn:wordcraft:canvas-xfrm), which Word skips.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
This commit is contained in:
authored and GitHub committed 2026-10-11 13:45:13 -04:00
1 parent 908a6de2c7
commit 72e59f9f0b
35 files changed
+907 -56

No files matched your search

+3 -5
View File
@@ -2,15 +2,15 @@
Generated by `cargo xtask parity` (`wordcraft-cli parity --markdown`): the word-processor feature catalog (`crates/engine/src/catalog.rs`) compared with the live command registry.
**421 of 448 catalog features have commands (94.0%).**
**423 of 448 catalog features have commands (94.4%).**
| Tab | Live | Total |
|---|---|---|
| File | 20 | 20 |
| Quick Access | 4 | 4 |
| Home | 101 | 102 |
| Insert | 44 | 53 |
| Draw | 5 | 11 |
| Insert | 45 | 53 |
| Draw | 6 | 11 |
| Design | 10 | 10 |
| Layout | 19 | 19 |
| References | 24 | 24 |
@@ -39,7 +39,6 @@ Generated by `cargo xtask parity` (`wordcraft-cli parity --markdown`): the word-
- Illustrations › SmartArt (`insert.smartArt`)
- Illustrations › Chart (`insert.chart`)
- Illustrations › Screenshot (`insert.screenshot`)
- Illustrations › Drawing Canvas (`insert.canvas`)
- Add-ins › Get Add-ins (`addins.get`)
- Media › Online Video (`insert.video`)
- Symbols › Ink Equation (`insert.inkEquation`)
@@ -50,7 +49,6 @@ Generated by `cargo xtask parity` (`wordcraft-cli parity --markdown`): the word-
- Pens › Add Pen (`draw.addPen`)
- Convert › Ink to Shape (`draw.inkToShape`)
- Convert › Ink to Math (`draw.inkToMath`)
- Insert › Drawing Canvas (`insert.canvas`)
- Replay › Ink Replay (`draw.replay`)
### Review