The Aspose.Words.Drawing namespace contains classes that allow to create and modify drawing objects in Microsoft Word documents.
Aspose.Words supports all grawing objects in Microsoft Word documents, including OfficeArt shapes, textboxes, pictures, diagrams, OLE objects and ActiveX controls.
The main classes in this namespace are:
-
Shape represents an object in the drawing layer, such as an AutoShape, textbox, freeform, OLE object, ActiveX control, or picture.
-
GroupShape represents a group of shapes in a document.
-
ShapeBase is the base class for the shape and group shape classes, provides all common shape properties such as position, size and text wrapping. A shape is a node in the document tree.
Although not every type of drawing object can be programmatically created and not every shape property can be accessed, all drawing objects are fully preserved in Microsoft Word documents during document open-save operations.
Names of classes, methods and properties in this namespace correspond to VML DOM where possible.
Namespace hierarchy
Classes
| Class | Description |
|---|
| Fill | Defines a fill for a shape. |
| GroupShape | Represents a group of shapes in a document. |
| ImageData | Defines an image for a shape. |
| OleFormat | Provides access to the data of an OLE object or ActiveX control. |
| Shape | Represents an object in the drawing layer, such as an AutoShape, textbox, freeform, OLE object, ActiveX control, or picture. |
| ShapeBase | Base class for objects in the drawing layer, such as an AutoShape, freeform, OLE object, ActiveX control, or picture. |
| Stroke | Defines a stroke for a shape. |
| TextBox | Defines attributes that specify how a text is displayed inside a shape. |
| TextPath | Defines the text and formatting of the text path (of a WordArt object). |
Structures
| Structure | Description |
|---|
| ImageSize | Contains information about image size and resolution. |
Enumerations
| Enumeration | Description |
|---|
| ArrowLength | Length of the arrow at the end of a line. |
| ArrowType | Specifies the type of an arrow at a line end. |
| ArrowWidth | Width of the arrow at the end of a line. |
| DashStyle | Dashed line style. |
| EndCap | Specifies line cap style. |
| FlipOrientation | Possible values for the orientation of a shape. |
| HorizontalAlignment | Specifies horizontal alignment of a floating shape, text frame or floating table. |
| ImageType | Specifies the type (format) of an image in a Microsoft Word document. |
| JoinStyle | Line join style. |
| LayoutFlow | Determines the flow of the text layout in a textbox. |
| RelativeHorizontalPosition | Specifies to what the horizontal position of a shape or text frame is relative. |
| RelativeVerticalPosition | Specifies to what the vertical position of a shape or text frame is relative. |
| ShapeLineStyle | Specifies the compound line style of a Shape. |
| ShapeType | Specifies the type of shape in a Microsoft Word document. |
| TextBoxWrapMode | Specifies how text wraps inside a shape. |
| TextPathAlignment | WordArt alignment. |
| VerticalAlignment | Specifies vertical alignment of a floating shape, text frame or a floating table. |
| WrapSide | Specifies what side(s) of the shape or picture the text wraps around. |
| WrapType | Specifies how text is wrapped around a shape or picture. |