Back to Paragraph
AddShapeMethod
Definition
- Namespace
- DOM.Elements.TextElements
- Assembly
- DOM.dll
Adds a vector or drawing shape to the paragraph.
AddShape(IShape shape)Parameters
- shape
- The shape element to add.
Returns
The same instance, allowing fluent method chaining. shape
Remarks
Shapes may be inline or floating depending on their configuration. The shape is appended to the paragraph's collection of child elements and participates in the surrounding layout according to its wrapping settings.
Examples
csharp
1var p = doc.AddParagraph();
2var box = new Shape { Type = ShapeType.Rectangle };
3box.SetDimensions(100, 50, Units.pt);
4p.AddShape(box);
5