Click or drag to resize

Shape Class

Represents a shape, such as Rectangle or Line.
Inheritance Hierarchy

Namespace:  GemBox.Document.Drawing
Assembly:  GemBox.Document (in GemBox.Document.dll) Version:
public class Shape : DrawingElement

The Shape type exposes the following members.

Public methodShape
Initializes a new instance of the Shape class.
Public propertyAdjustValues
Gets the shape's adjust values.
Public propertyContent
Gets the content of the current Element.
(Inherited from Element.)
Public propertyDocument
Gets the owner document.
(Inherited from Element.)
Public propertyElementType
Gets the element type for Shape which is Shape.
(Overrides ElementElementType.)
Public propertyFill
Gets the Brush that specifies how the shape's interior is filled.
Public propertyLayout
Gets or sets the DrawingElement layout (position and size).
(Inherited from DrawingElement.)
Public propertyMetadata
Gets the metadata (non-visual properties) of this DrawingElement instance.
(Inherited from DrawingElement.)
Public propertyOutline
Gets the Pen that specifies the shape's outline.
Public propertyParent
Gets the parent of this Element instance.
(Inherited from Element.)
Public propertyParentCollection
Gets the InlineCollection that contains this Inline instance.
(Inherited from Inline.)
Public propertyShapeType
Gets the type of the shape.

Shape's type (geometry) is represented by ShapeType enumeration. It can be set only through Shape(DocumentModel, ShapeType, Layout) constructor and retrieved from ShapeType property.

Shape can be filled with a Brush and outlined with a Pen.

Shape can be positioned in-line with the rest of the document content or floating within document content. For more information, see remarks for DrawingElement.Layout property.

For more information about shapes and layout, see shapes and layout article and shapes example.

See Also