Shapes
Shapes are vector graphics — rectangles, ellipses, arrows, stars, etc. Usenew Shape (or a specialized shape) and add it withdoc.AddShape(...) or paragraph.AddShape(...). Shapes support fills, outlines, and the same transform API as images.
Add a Shape with Fill and Outline
Use case: Draw a rectangle with a colored fill and a dashed outline.
Apply a Gradient Fill to a Shape
Use case: Give a shape a smooth two‑color gradient.
Rotate a Shape
Use case: Rotate a star shape by 45 degrees around its anchor.
Frequently asked questions
What shape types are available?
The ShapeType enum includes standard flow‑chart, arrows, stars, callouts, action buttons, and math shapes.
How do I remove the outline of a shape?
Set OutLine = null or assign a BorderValues.none style.
Can shapes overlap?
Yes — by default they are floating elements. Use SetBehindDocument or ZIndex on the transform to control stacking.