ShapeBase Class |
Namespace: Aspose.Words.Drawing
The ShapeBase type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | AllowOverlap |
Gets or sets a value that specifies whether this shape can overlap other shapes.
|
![]() ![]() | AlternativeText |
Defines alternative text to be displayed instead of a graphic.
|
![]() ![]() | AnchorLocked |
Specifies whether the shape's anchor is locked.
|
![]() ![]() | AspectRatioLocked |
Specifies whether the shape's aspect ratio is locked.
|
![]() ![]() | BehindText |
Specifies whether the shape is below or above text.
|
![]() ![]() | Bottom |
Gets the position of the bottom edge of the containing block of the shape.
|
![]() ![]() | Bounds |
Gets or sets the location and size of the containing block of the shape.
|
![]() ![]() | BoundsInPoints |
Gets the location and size of the containing block of the shape in points, relative to the anchor of the topmost shape.
|
![]() ![]() | BoundsWithEffects |
Gets final extent that this shape object has after applying drawing effects.
Value is measured in points.
|
![]() ![]() | CanHaveImage |
Returns true if the shape type allows the shape to have an image.
|
![]() ![]() | ChildNodes |
Gets all immediate child nodes of this node.
(Inherited from CompositeNode.) |
![]() ![]() | CoordOrigin |
The coordinates at the top-left corner of the containing block of this shape.
|
![]() ![]() | CoordSize |
The width and height of the coordinate space inside the containing block of this shape.
|
![]() ![]() | Count |
Gets the number of immediate children of this node.
(Inherited from CompositeNode.) |
![]() ![]() | DistanceBottom |
Returns or sets the distance (in points) between the document text and the bottom edge of the shape.
|
![]() ![]() | DistanceLeft |
Returns or sets the distance (in points) between the document text and the left edge of the shape.
|
![]() ![]() | DistanceRight |
Returns or sets the distance (in points) between the document text and the right edge of the shape.
|
![]() ![]() | DistanceTop |
Returns or sets the distance (in points) between the document text and the top edge of the shape.
|
![]() ![]() | Document |
Gets the document to which this node belongs.
(Inherited from Node.) |
![]() ![]() | FirstChild |
Gets the first child of the node.
(Inherited from CompositeNode.) |
![]() ![]() | FlipOrientation |
Switches the orientation of a shape.
|
![]() ![]() | Font |
Provides access to the font formatting of this object.
|
![]() ![]() | HasChildNodes |
Returns true if this node has any child nodes.
(Inherited from CompositeNode.) |
![]() ![]() | Height |
Gets or sets the height of the containing block of the shape.
|
![]() ![]() | HorizontalAlignment |
Specifies how the shape is positioned horizontally.
|
![]() ![]() | HRef |
Gets or sets the full hyperlink address for a shape.
|
![]() ![]() | IsComposite |
Returns true as this node can have child nodes.
(Inherited from CompositeNode.) |
![]() ![]() | IsDeleteRevision |
Returns true if this object was deleted in Microsoft Word while change tracking was enabled.
|
![]() ![]() | IsGroup |
Returns true if this is a group shape.
|
![]() ![]() | IsHorizontalRule |
Returns true if this shape is a horizontal rule.
|
![]() ![]() | IsImage |
Returns true if this shape is an image shape.
|
![]() ![]() | IsInline |
A quick way to determine if this shape is positioned inline with text.
|
![]() ![]() | IsInsertRevision |
Returns true if this object was inserted in Microsoft Word while change tracking was enabled.
|
![]() ![]() | IsLayoutInCell |
Gets or sets a flag indicating whether the shape is displayed inside a table or outside of it.
|
![]() ![]() | IsMoveFromRevision |
Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.
|
![]() ![]() | IsMoveToRevision |
Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.
|
![]() ![]() | IsSignatureLine |
Indicates that shape is a SignatureLine.
|
![]() ![]() | IsTopLevel |
Returns true if this shape is not a child of a group shape.
|
![]() ![]() | IsWordArt |
Returns true if this shape is a WordArt object.
|
![]() ![]() | LastChild |
Gets the last child of the node.
(Inherited from CompositeNode.) |
![]() ![]() | Left |
Gets or sets the position of the left edge of the containing block of the shape.
|
![]() ![]() | MarkupLanguage |
Gets MarkupLanguage used for this graphic object.
|
![]() ![]() | Name |
Gets or sets the optional shape name.
|
![]() ![]() | NextSibling |
Gets the node immediately following this node.
(Inherited from Node.) |
![]() ![]() | NodeType |
Gets the type of this node.
(Inherited from Node.) |
![]() ![]() | ParentNode |
Gets the immediate parent of this node.
(Inherited from Node.) |
![]() ![]() | ParentParagraph |
Returns the immediate parent paragraph.
|
![]() ![]() | PreviousSibling |
Gets the node immediately preceding this node.
(Inherited from Node.) |
![]() ![]() | Range |
Returns a Range object that represents the portion of a document that is contained in this node.
(Inherited from Node.) |
![]() ![]() | RelativeHorizontalPosition |
Specifies relative to what the shape is positioned horizontally.
|
![]() ![]() | RelativeVerticalPosition |
Specifies relative to what the shape is positioned vertically.
|
![]() ![]() | Right |
Gets the position of the right edge of the containing block of the shape.
|
![]() ![]() | Rotation |
Defines the angle (in degrees) that a shape is rotated.
Positive value corresponds to clockwise rotation angle.
|
![]() ![]() | ScreenTip |
Defines the text displayed when the mouse pointer moves over the shape.
|
![]() ![]() | ShapeType |
Gets the shape type.
|
![]() ![]() | SizeInPoints |
Gets the size of the shape in points.
|
![]() ![]() | Target |
Gets or sets the target frame for the shape hyperlink.
|
![]() ![]() | Title |
Gets or sets the title (caption) of the current shape object.
|
![]() ![]() | Top |
Gets or sets the position of the top edge of the containing block of the shape.
|
![]() ![]() | VerticalAlignment |
Specifies how the shape is positioned vertically.
|
![]() ![]() | Width |
Gets or sets the width of the containing block of the shape.
|
![]() ![]() | WrapSide |
Specifies how the text is wrapped around the shape.
|
![]() ![]() | WrapType |
Defines whether the shape is inline or floating. For floating shapes defines the wrapping mode for text around the shape.
|
![]() ![]() | ZOrder |
Determines the display order of overlapping shapes.
|
Name | Description | |
---|---|---|
![]() ![]() | Accept |
Accepts a visitor.
(Inherited from Node.) |
![]() ![]() | AdjustWithEffects |
Adds to the source rectangle values of the effect extent and returns the final rectangle.
|
![]() ![]() | AppendChild |
Adds the specified node to the end of the list of child nodes for this node.
(Inherited from CompositeNode.) |
![]() ![]() | Clone | (Inherited from Node.) |
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetAncestor(Type) |
Gets the first ancestor of the specified object type.
(Inherited from Node.) |
![]() ![]() | GetAncestor(NodeType) |
Gets the first ancestor of the specified NodeType.
(Inherited from Node.) |
![]() ![]() | GetChild |
Returns an Nth child node that matches the specified type.
(Inherited from CompositeNode.) |
![]() ![]() | GetChildNodes |
Returns a live collection of child nodes that match the specified type.
(Inherited from CompositeNode.) |
![]() ![]() | GetEnumerator |
Provides support for the for each style iteration over the child nodes of this node.
(Inherited from CompositeNode.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() ![]() | GetShapeRenderer |
Creates and returns an object that can be used to render this shape into an image.
|
![]() ![]() | GetText |
Gets the text of this node and of all its children.
(Inherited from CompositeNode.) |
![]() | GetType | (Inherited from Object.) |
![]() ![]() | IndexOf |
Returns the index of the specified child node in the child node array.
(Inherited from CompositeNode.) |
![]() ![]() | InsertAfter |
Inserts the specified node immediately after the specified reference node.
(Inherited from CompositeNode.) |
![]() ![]() | InsertBefore |
Inserts the specified node immediately before the specified reference node.
(Inherited from CompositeNode.) |
![]() ![]() | LocalToParent |
Converts a value from the local coordinate space into the coordinate space of the parent shape.
|
![]() ![]() | NextPreOrder |
Gets next node according to the pre-order tree traversal algorithm.
(Inherited from Node.) |
![]() ![]() | PrependChild |
Adds the specified node to the beginning of the list of child nodes for this node.
(Inherited from CompositeNode.) |
![]() ![]() | PreviousPreOrder |
Gets the previous node according to the pre-order tree traversal algorithm.
(Inherited from Node.) |
![]() ![]() | Remove |
Removes itself from the parent.
(Inherited from Node.) |
![]() ![]() | RemoveAllChildren |
Removes all the child nodes of the current node.
(Inherited from CompositeNode.) |
![]() ![]() | RemoveChild |
Removes the specified child node.
(Inherited from CompositeNode.) |
![]() ![]() | RemoveSmartTags |
Removes all SmartTag descendant nodes of the current node.
(Inherited from CompositeNode.) |
![]() ![]() | SelectNodes |
Selects a list of nodes matching the XPath expression.
(Inherited from CompositeNode.) |
![]() ![]() | SelectSingleNode |
Selects the first Node that matches the XPath expression.
(Inherited from CompositeNode.) |
![]() | ToString | (Inherited from Object.) |
![]() ![]() | ToString(SaveFormat) |
Exports the content of the node into a string in the specified format.
(Inherited from Node.) |
![]() ![]() | ToString(SaveOptions) |
Exports the content of the node into a string using the specified save options.
(Inherited from Node.) |
This is an abstract class. The two derived classes that you can instantiate are Shape and GroupShape.
A shape is a node in the document tree.
If the shape is a child of a Paragraph object, then the shape is said to be "top-level". Top-level shapes are measured and positioned in points.
A shape can also occur as a child of a GroupShape object when several shapes are grouped. Child shapes of a group shape are positioned in the coordinate space and units defined by the CoordSize and CoordOrigin properties of the parent group shape.
A shape can be positioned inline with text or floating. The positioning method is controlled using the WrapType property.
When a shape is floating, it is positioned relative to something (e.g the current paragraph, the margin or the page). The relative positioning of the shape is specified using the RelativeHorizontalPosition and RelativeVerticalPosition properties.
A floating shape be positioned explicitly using the Left and Top properties or aligned relative to some other object using the HorizontalAlignment and VerticalAlignment properties.
// This creates a builder and also an empty document inside the builder DocumentBuilder builder = new DocumentBuilder(); // By default, the image is inline Shape shape = builder.InsertImage(ImageDir + "Logo.jpg"); // Make the image float, put it behind text and center on the page shape.WrapType = WrapType.None; shape.BehindText = true; shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Page; shape.HorizontalAlignment = HorizontalAlignment.Center; shape.RelativeVerticalPosition = RelativeVerticalPosition.Page; shape.VerticalAlignment = VerticalAlignment.Center; builder.Document.Save(ArtifactsDir + "Image.CreateFloatingPageCenter.doc");