Aspose::Words::Drawing::Shape Class Referencefinal

Represents an object in the drawing layer, such as an AutoShape, textbox, freeform, OLE object, ActiveX control, or picture. More...

#include "Aspose.Words.Cpp/Model/Drawing/Shape.h"

Inherits Aspose::Words::Drawing::ShapeBase, and ITextBox.

Public Member Functions

virtual Aspose::Words::NodeType get_NodeType () const
 Returns Aspose::Words::NodeType::Shape. More...
 
Aspose::Words::StoryType get_StoryType ()
 Returns Aspose::Words::StoryType::Textbox. More...
 
bool get_ExtrusionEnabled ()
 Returns true if an extrusion effect is enabled. More...
 
bool get_ShadowEnabled ()
 Returns true if a shadow effect is enabled. More...
 
System::SharedPtr< Aspose::Words::Drawing::Strokeget_Stroke ()
 Defines a stroke for a shape. More...
 
bool get_Stroked ()
 Defines whether the path will be stroked. More...
 
void set_Stroked (bool value)
 Setter for Aspose::Words::Drawing::Shape::get_Stroked. More...
 
double get_StrokeWeight ()
 Defines the brush thickness that strokes the path of a shape in points. More...
 
void set_StrokeWeight (double value)
 Setter for Aspose::Words::Drawing::Shape::get_StrokeWeight. More...
 
System::Drawing::Color get_StrokeColor ()
 Defines the color of a stroke. More...
 
void set_StrokeColor (System::Drawing::Color value)
 Setter for Aspose::Words::Drawing::Shape::get_StrokeColor. More...
 
System::SharedPtr< Aspose::Words::Drawing::Fillget_Fill ()
 Defines a fill for a shape. More...
 
bool get_Filled ()
 Determines whether the closed path of the shape will be filled. More...
 
void set_Filled (bool value)
 Setter for Aspose::Words::Drawing::Shape::get_Filled. More...
 
System::Drawing::Color get_FillColor ()
 Defines the brush color that fills the closed path of the shape. More...
 
void set_FillColor (System::Drawing::Color value)
 Setter for Aspose::Words::Drawing::Shape::get_FillColor. More...
 
bool get_HasImage ()
 Returns true if the shape has image bytes or links an image. More...
 
System::SharedPtr< Aspose::Words::Drawing::ImageDataget_ImageData ()
 Provides access to the image of the shape. Returns null if the shape cannot have an image. More...
 
System::SharedPtr< Aspose::Words::Drawing::OleFormatget_OleFormat ()
 Provides access to the OLE data of a shape. For a shape that is not an OLE object or ActiveX control, returns null. More...
 
System::SharedPtr< Aspose::Words::Drawing::TextBoxget_TextBox ()
 Defines attributes that specify how text is displayed in a shape. More...
 
System::SharedPtr< Aspose::Words::Drawing::TextPathget_TextPath ()
 Defines the text of the text path (of a WordArt object). More...
 
System::SharedPtr< Aspose::Words::Paragraphget_FirstParagraph ()
 Gets the first paragraph in the shape. More...
 
System::SharedPtr< Aspose::Words::Paragraphget_LastParagraph ()
 Gets the last paragraph in the shape. More...
 
System::SharedPtr< Aspose::Words::Drawing::HorizontalRuleFormatget_HorizontalRuleFormat ()
 Provides access to the properties of the horizontal rule shape. For a shape that is not a horizontal rule, returns null. More...
 
Aspose::Words::Drawing::TextBoxWrapMode get_TextBoxWrapMode_ITextBox ()
 
Aspose::Words::Drawing::LayoutFlow get_TextboxLayoutFlow_ITextBox ()
 
bool get_HasVerticalTextFlow_ITextBox ()
 
Aspose::Words::Drawing::ShapeMarkupLanguage get_MarkupLanguage_ITextBox ()
 
bool get_HasChart ()
 Returns true if this Shape has a Aspose::Words::Drawing::Shape::get_Chart. More...
 
bool get_HasSmartArt ()
 Returns true if this Shape has a SmartArt object. More...
 
System::SharedPtr< Aspose::Words::Drawing::Charts::Chartget_Chart ()
 Provides access to the chart properties if this shape has a Chart. More...
 
 Shape (System::SharedPtr< Aspose::Words::DocumentBase > doc, Aspose::Words::Drawing::ShapeType shapeType)
 Creates a new shape object. More...
 
virtual bool Accept (System::SharedPtr< Aspose::Words::DocumentVisitor > visitor)
 Accepts a visitor. More...
 
float GetHorizontalMargins_ITextBox ()
 
- Public Member Functions inherited from Aspose::Words::Drawing::ShapeBase
System::SharedPtr< Aspose::Words::Paragraphget_ParentParagraph_IInline ()
 
System::SharedPtr< Aspose::Words::DocumentBaseget_Document_IInline ()
 
System::SharedPtr< Aspose::Words::RunPr > get_RunPr_IInline ()
 
void set_RunPr_IInline (System::SharedPtr< Aspose::Words::RunPr > value)
 
int32_t get_ZOrder_IShape ()
 
void set_ZOrder_IShape (int32_t value)
 
System::SharedPtr< Aspose::Words::Revisions::EditRevision > get_InsertRevision ()
 
void set_InsertRevision (System::SharedPtr< Aspose::Words::Revisions::EditRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::EditRevision > get_DeleteRevision ()
 
void set_DeleteRevision (System::SharedPtr< Aspose::Words::Revisions::EditRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::MoveRevision > get_MoveFromRevision ()
 
void set_MoveFromRevision (System::SharedPtr< Aspose::Words::Revisions::MoveRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::MoveRevision > get_MoveToRevision ()
 
void set_MoveToRevision (System::SharedPtr< Aspose::Words::Revisions::MoveRevision > value)
 
System::String get_ScreenTip ()
 Defines the text displayed when the mouse pointer moves over the shape. More...
 
void set_ScreenTip (System::String value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_ScreenTip. More...
 
System::String get_HRef ()
 Gets or sets the full hyperlink address for a shape. More...
 
void set_HRef (System::String value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_HRef. More...
 
System::String get_Target ()
 Gets or sets the target frame for the shape hyperlink. More...
 
void set_Target (System::String value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Target. More...
 
System::String get_AlternativeText ()
 Defines alternative text to be displayed instead of a graphic. More...
 
void set_AlternativeText (System::String value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_AlternativeText. More...
 
System::String get_Title ()
 Gets or sets the title (caption) of the current shape object. More...
 
void set_Title (System::String value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Title. More...
 
System::String get_Name ()
 Gets or sets the optional shape name. More...
 
void set_Name (System::String value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Name. More...
 
bool get_IsInsertRevision ()
 Returns true if this object was inserted in Microsoft Word while change tracking was enabled. More...
 
bool get_IsDeleteRevision ()
 Returns true if this object was deleted in Microsoft Word while change tracking was enabled. More...
 
bool get_IsMoveFromRevision ()
 Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled. More...
 
bool get_IsMoveToRevision ()
 Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled. More...
 
bool get_IsTopLevel ()
 Returns true if this shape is not a child of a group shape. More...
 
bool get_IsGroup ()
 Returns true if this is a group shape. More...
 
bool get_IsImage ()
 Returns true if this shape is an image shape. More...
 
bool get_IsTextBox ()
 Return true is this shape is a TextBox shape. More...
 
bool get_IsHorizontalRule ()
 Returns true if this shape is a horizontal rule. More...
 
bool get_IsWordArt ()
 Returns true if this shape is a WordArt object. More...
 
bool get_CanHaveImage ()
 Returns true if the shape type allows the shape to have an image. More...
 
bool get_AnchorLocked ()
 Specifies whether the shape's anchor is locked. More...
 
void set_AnchorLocked (bool value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_AnchorLocked. More...
 
bool get_AspectRatioLocked ()
 Specifies whether the shape's aspect ratio is locked. More...
 
void set_AspectRatioLocked (bool value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_AspectRatioLocked. More...
 
bool get_AllowOverlap ()
 Gets or sets a value that specifies whether this shape can overlap other shapes. More...
 
void set_AllowOverlap (bool value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_AllowOverlap. More...
 
bool get_BehindText ()
 Specifies whether the shape is below or above text. More...
 
void set_BehindText (bool value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_BehindText. More...
 
bool get_IsInline ()
 A quick way to determine if this shape is positioned inline with text. More...
 
double get_Left ()
 Gets or sets the position of the left edge of the containing block of the shape. More...
 
void set_Left (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Left. More...
 
double get_Top ()
 Gets or sets the position of the top edge of the containing block of the shape. More...
 
void set_Top (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Top. More...
 
double get_Right ()
 Gets the position of the right edge of the containing block of the shape. More...
 
double get_Bottom ()
 Gets the position of the bottom edge of the containing block of the shape. More...
 
double get_Width ()
 Gets or sets the width of the containing block of the shape. More...
 
void set_Width (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Width. More...
 
double get_Height ()
 Gets or sets the height of the containing block of the shape. More...
 
void set_Height (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Height. More...
 
double get_DistanceTop ()
 Returns or sets the distance (in points) between the document text and the top edge of the shape. More...
 
void set_DistanceTop (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_DistanceTop. More...
 
double get_DistanceBottom ()
 Returns or sets the distance (in points) between the document text and the bottom edge of the shape. More...
 
void set_DistanceBottom (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_DistanceBottom. More...
 
double get_DistanceLeft ()
 Returns or sets the distance (in points) between the document text and the left edge of the shape. More...
 
void set_DistanceLeft (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_DistanceLeft. More...
 
double get_DistanceRight ()
 Returns or sets the distance (in points) between the document text and the right edge of the shape. More...
 
void set_DistanceRight (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_DistanceRight. More...
 
double get_Rotation ()
 Defines the angle (in degrees) that a shape is rotated. Positive value corresponds to clockwise rotation angle. More...
 
void set_Rotation (double value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Rotation. More...
 
int32_t get_ZOrder ()
 Determines the display order of overlapping shapes. More...
 
void set_ZOrder (int32_t value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_ZOrder. More...
 
System::SharedPtr< Aspose::Words::Paragraphget_ParentParagraph ()
 Returns the immediate parent paragraph. More...
 
System::Drawing::RectangleF get_Bounds ()
 Gets or sets the location and size of the containing block of the shape. More...
 
void set_Bounds (System::Drawing::RectangleF value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_Bounds. More...
 
System::Drawing::RectangleF get_BoundsInPoints ()
 Gets the location and size of the containing block of the shape in points, relative to the anchor of the topmost shape. More...
 
System::Drawing::RectangleF get_BoundsWithEffects ()
 Gets final extent that this shape object has after applying drawing effects. Value is measured in points. More...
 
Aspose::Words::Drawing::ShapeType get_ShapeType ()
 Gets the shape type. More...
 
Aspose::Words::Drawing::ShapeMarkupLanguage get_MarkupLanguage () const
 Gets MarkupLanguage used for this graphic object. More...
 
System::Drawing::SizeF get_SizeInPoints ()
 Gets the size of the shape in points. More...
 
Aspose::Words::Drawing::FlipOrientation get_FlipOrientation ()
 Switches the orientation of a shape. More...
 
void set_FlipOrientation (Aspose::Words::Drawing::FlipOrientation value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_FlipOrientation. More...
 
Aspose::Words::Drawing::RelativeHorizontalPosition get_RelativeHorizontalPosition ()
 Specifies relative to what the shape is positioned horizontally. More...
 
void set_RelativeHorizontalPosition (Aspose::Words::Drawing::RelativeHorizontalPosition value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_RelativeHorizontalPosition. More...
 
Aspose::Words::Drawing::RelativeVerticalPosition get_RelativeVerticalPosition ()
 Specifies relative to what the shape is positioned vertically. More...
 
void set_RelativeVerticalPosition (Aspose::Words::Drawing::RelativeVerticalPosition value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_RelativeVerticalPosition. More...
 
Aspose::Words::Drawing::HorizontalAlignment get_HorizontalAlignment ()
 Specifies how the shape is positioned horizontally. More...
 
void set_HorizontalAlignment (Aspose::Words::Drawing::HorizontalAlignment value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_HorizontalAlignment. More...
 
Aspose::Words::Drawing::VerticalAlignment get_VerticalAlignment ()
 Specifies how the shape is positioned vertically. More...
 
void set_VerticalAlignment (Aspose::Words::Drawing::VerticalAlignment value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_VerticalAlignment. More...
 
Aspose::Words::Drawing::WrapType get_WrapType ()
 Defines whether the shape is inline or floating. For floating shapes defines the wrapping mode for text around the shape. More...
 
void set_WrapType (Aspose::Words::Drawing::WrapType value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_WrapType. More...
 
Aspose::Words::Drawing::WrapSide get_WrapSide ()
 Specifies how the text is wrapped around the shape. More...
 
void set_WrapSide (Aspose::Words::Drawing::WrapSide value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_WrapSide. More...
 
System::Drawing::Point get_CoordOrigin ()
 The coordinates at the top-left corner of the containing block of this shape. More...
 
void set_CoordOrigin (System::Drawing::Point value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_CoordOrigin. More...
 
System::Drawing::Size get_CoordSize ()
 The width and height of the coordinate space inside the containing block of this shape. More...
 
void set_CoordSize (System::Drawing::Size value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_CoordSize. More...
 
System::SharedPtr< Aspose::Words::Fontget_Font ()
 Provides access to the font formatting of this object. More...
 
bool get_IsSignatureLine ()
 Indicates that shape is a SignatureLine. More...
 
bool get_IsLayoutInCell ()
 Gets or sets a flag indicating whether the shape is displayed inside a table or outside of it. More...
 
void set_IsLayoutInCell (bool value)
 Setter for Aspose::Words::Drawing::ShapeBase::get_IsLayoutInCell. More...
 
System::SharedPtr< Aspose::Words::Rendering::ShapeRendererGetShapeRenderer ()
 Creates and returns an object that can be used to render this shape into an image. More...
 
System::SharedPtr< Aspose::Words::RunPr > GetExpandedRunPr_IInline (Aspose::Words::RunPrExpandFlags flags)
 
System::SharedPtr< System::ObjectGetDirectShapeAttr (int32_t key)
 Reserved for system use. IShapeAttrSource. More...
 
System::SharedPtr< System::ObjectFetchInheritedShapeAttr (int32_t key)
 Reserved for system use. IShapeAttrSource. More...
 
System::SharedPtr< System::ObjectFetchShapeAttr (int32_t key)
 Reserved for system use. IShapeAttrSource. More...
 
void SetShapeAttr (int32_t key, System::SharedPtr< System::Object > value)
 Reserved for system use. IShapeAttrSource. More...
 
void RemoveShapeAttr (int32_t key)
 Reserved for system use. IShapeAttrSource. More...
 
System::SharedPtr< System::ObjectGetDirectRunAttr (int32_t fontAttr)
 
System::SharedPtr< System::ObjectFetchInheritedRunAttr (int32_t fontAttr)
 
void SetRunAttr (int32_t fontAttr, System::SharedPtr< System::Object > value)
 
void RemoveRunAttr (int32_t key)
 
void ClearRunAttrs ()
 
System::Drawing::PointF LocalToParent (System::Drawing::PointF value)
 Converts a value from the local coordinate space into the coordinate space of the parent shape. More...
 
System::Drawing::RectangleF AdjustWithEffects (System::Drawing::RectangleF source)
 Adds to the source rectangle values of the effect extent and returns the final rectangle. More...
 
- Public Member Functions inherited from Aspose::Words::CompositeNode
virtual bool get_IsComposite ()
 Returns true as this node can have child nodes. More...
 
bool get_HasChildNodes ()
 Returns true if this node has any child nodes. More...
 
System::SharedPtr< Aspose::Words::NodeCollectionget_ChildNodes ()
 Gets all immediate child nodes of this node. More...
 
System::SharedPtr< Aspose::Words::Nodeget_FirstChild () const
 Gets the first child of the node. More...
 
System::SharedPtr< Aspose::Words::Nodeget_LastChild () const
 Gets the last child of the node. More...
 
int32_t get_Count ()
 Gets the number of immediate children of this node. More...
 
System::SharedPtr< Aspose::Words::CompositeNodeget_Container ()
 
virtual ~CompositeNode ()
 
virtual System::String GetText ()
 Gets the text of this node and of all its children. More...
 
System::SharedPtr< Aspose::Words::NodeCollectionGetChildNodes (Aspose::Words::NodeType nodeType, bool isDeep)
 Returns a live collection of child nodes that match the specified type. More...
 
System::SharedPtr< Aspose::Words::NodeGetChild (Aspose::Words::NodeType nodeType, int32_t index, bool isDeep)
 Returns an Nth child node that matches the specified type. More...
 
System::SharedPtr< Aspose::Words::NodeListSelectNodes (System::String xpath)
 Selects a list of nodes matching the XPath expression. More...
 
System::SharedPtr< Aspose::Words::NodeSelectSingleNode (System::String xpath)
 Selects the first Node that matches the XPath expression. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Aspose::Words::Node > > > GetEnumerator ()
 Provides support for the for each style iteration over the child nodes of this node. More...
 
System::SharedPtr< Aspose::Words::NodeAppendChild (System::SharedPtr< Aspose::Words::Node > newChild)
 Adds the specified node to the end of the list of child nodes for this node. More...
 
System::SharedPtr< Aspose::Words::NodePrependChild (System::SharedPtr< Aspose::Words::Node > newChild)
 Adds the specified node to the beginning of the list of child nodes for this node. More...
 
System::SharedPtr< Aspose::Words::NodeInsertAfter (System::SharedPtr< Aspose::Words::Node > newChild, System::SharedPtr< Aspose::Words::Node > refChild)
 Inserts the specified node immediately after the specified reference node. More...
 
System::SharedPtr< Aspose::Words::NodeInsertBefore (System::SharedPtr< Aspose::Words::Node > newChild, System::SharedPtr< Aspose::Words::Node > refChild)
 Inserts the specified node immediately before the specified reference node. More...
 
System::SharedPtr< Aspose::Words::NodeRemoveChild (System::SharedPtr< Aspose::Words::Node > oldChild)
 Removes the specified child node. More...
 
void RemoveAllChildren ()
 Removes all the child nodes of the current node. More...
 
void RemoveSmartTags ()
 Removes all Aspose::Words::Markup::SmartTag descendant nodes of the current node. More...
 
int32_t IndexOf (System::SharedPtr< Aspose::Words::Node > child)
 Returns the index of the specified child node in the child node array. More...
 
System::SharedPtr< Aspose::Words::NodeGetNextMatchingNode (System::SharedPtr< Aspose::Words::Node > &curNode)
 
- Public Member Functions inherited from Aspose::Words::Node
System::SharedPtr< Aspose::Words::CompositeNodeget_ParentNode ()
 Gets the immediate parent of this node. More...
 
System::SharedPtr< Aspose::Words::DocumentBaseget_Document ()
 Gets the document to which this node belongs. More...
 
System::SharedPtr< Aspose::Words::Nodeget_PreviousSibling ()
 Gets the node immediately preceding this node. More...
 
System::SharedPtr< Aspose::Words::Nodeget_NextSibling ()
 Gets the node immediately following this node. More...
 
System::SharedPtr< Aspose::Words::Rangeget_Range ()
 Returns a Range object that represents the portion of a document that is contained in this node. More...
 
System::SharedPtr< Aspose::Words::NodeClone (bool isCloneChildren)
 
template<typename T >
GetAncestorOf ()
 
System::SharedPtr< Aspose::Words::CompositeNodeGetAncestor (Aspose::Words::NodeType ancestorType)
 Gets the first ancestor of the specified Aspose::Words::NodeType. More...
 
void Remove ()
 Removes itself from the parent. More...
 
System::SharedPtr< Aspose::Words::NodeNextPreOrder (System::SharedPtr< Aspose::Words::Node > rootNode)
 Gets next node according to the pre-order tree traversal algorithm. More...
 
System::SharedPtr< Aspose::Words::NodePreviousPreOrder (System::SharedPtr< Aspose::Words::Node > rootNode)
 Gets the previous node according to the pre-order tree traversal algorithm. More...
 
System::String ToString (Aspose::Words::SaveFormat saveFormat)
 Exports the content of the node into a string in the specified format. More...
 
System::String ToString (System::SharedPtr< Aspose::Words::Saving::SaveOptions > saveOptions)
 Exports the content of the node into a string using the specified save options. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Words::Node > >
typedef IEnumerator< System::SharedPtr< Aspose::Words::Node > > IEnumeratorType
 Enumerator type. More...
 
- Static Public Member Functions inherited from Aspose::Words::Node
static System::String NodeTypeToString (Aspose::Words::NodeType nodeType)
 A utility method that converts a node type enum value into a user friendly string. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Detailed Description

Represents an object in the drawing layer, such as an AutoShape, textbox, freeform, OLE object, ActiveX control, or picture.

Using the Aspose::Words::Drawing::Shape class you can create or modify shapes in a Microsoft Word document.

An important property of a shape is its Aspose::Words::Drawing::ShapeBase::get_ShapeType. Shapes of different types can have different capabilities in a Word document. For example, only image and OLE shapes can have images inside them. Most of the shapes can have text, but not all.

Shapes that can have text, can contain Aspose::Words::Paragraph and Aspose::Words::Tables::Table nodes as children.

See also
Aspose::Words::Drawing::ShapeBase, Aspose::Words::Drawing::GroupShape

Constructor & Destructor Documentation

◆ Shape()

Aspose::Words::Drawing::Shape::Shape ( System::SharedPtr< Aspose::Words::DocumentBase doc,
Aspose::Words::Drawing::ShapeType  shapeType 
)

Creates a new shape object.

You should specify desired shape properties after you created a shape.

Parameters
docThe owner document.
shapeTypeThe type of the shape to create.

Member Function Documentation

◆ Accept()

virtual bool Aspose::Words::Drawing::Shape::Accept ( System::SharedPtr< Aspose::Words::DocumentVisitor visitor)
virtual

Accepts a visitor.

Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.

For more info see the Visitor design pattern.

Parameters
visitorThe visitor that will visit the nodes.
Returns
True if all nodes were visited; false if DocumentVisitor stopped the operation before visiting all nodes.

Calls Aspose::Words::DocumentVisitor::VisitShapeStart(System::SharedPtr<Aspose::Words::Drawing::Shape>), then calls Aspose::Words::Node::Accept(System::SharedPtr<Aspose::Words::DocumentVisitor>) for all child nodes of the shape and calls Aspose::Words::DocumentVisitor::VisitShapeEnd(System::SharedPtr<Aspose::Words::Drawing::Shape>) at the end.

Implements Aspose::Words::Node.

◆ get_Chart()

System::SharedPtr<Aspose::Words::Drawing::Charts::Chart> Aspose::Words::Drawing::Shape::get_Chart ( )

Provides access to the chart properties if this shape has a Chart.

This property will return the Aspose::Words::Drawing::Shape::get_Chart object only if Aspose::Words::Drawing::Shape::get_HasChart property is true for this Shape, and will throw an exception otherwise.

◆ get_ExtrusionEnabled()

bool Aspose::Words::Drawing::Shape::get_ExtrusionEnabled ( )

Returns true if an extrusion effect is enabled.

◆ get_Fill()

System::SharedPtr<Aspose::Words::Drawing::Fill> Aspose::Words::Drawing::Shape::get_Fill ( )

Defines a fill for a shape.

◆ get_FillColor()

System::Drawing::Color Aspose::Words::Drawing::Shape::get_FillColor ( )

Defines the brush color that fills the closed path of the shape.

This is a shortcut to the Aspose::Words::Drawing::Fill::get_Color property.

The default value is System::Drawing::Color::get_White.

◆ get_Filled()

bool Aspose::Words::Drawing::Shape::get_Filled ( )

Determines whether the closed path of the shape will be filled.

This is a shortcut to the Aspose::Words::Drawing::Fill::get_On property.

The default value is true.

◆ get_FirstParagraph()

System::SharedPtr<Aspose::Words::Paragraph> Aspose::Words::Drawing::Shape::get_FirstParagraph ( )

Gets the first paragraph in the shape.

◆ get_HasChart()

bool Aspose::Words::Drawing::Shape::get_HasChart ( )

Returns true if this Shape has a Aspose::Words::Drawing::Shape::get_Chart.

◆ get_HasImage()

bool Aspose::Words::Drawing::Shape::get_HasImage ( )

Returns true if the shape has image bytes or links an image.

◆ get_HasSmartArt()

bool Aspose::Words::Drawing::Shape::get_HasSmartArt ( )

Returns true if this Shape has a SmartArt object.

◆ get_HasVerticalTextFlow_ITextBox()

bool Aspose::Words::Drawing::Shape::get_HasVerticalTextFlow_ITextBox ( )

◆ get_HorizontalRuleFormat()

System::SharedPtr<Aspose::Words::Drawing::HorizontalRuleFormat> Aspose::Words::Drawing::Shape::get_HorizontalRuleFormat ( )

Provides access to the properties of the horizontal rule shape. For a shape that is not a horizontal rule, returns null.

◆ get_ImageData()

System::SharedPtr<Aspose::Words::Drawing::ImageData> Aspose::Words::Drawing::Shape::get_ImageData ( )

Provides access to the image of the shape. Returns null if the shape cannot have an image.

◆ get_LastParagraph()

System::SharedPtr<Aspose::Words::Paragraph> Aspose::Words::Drawing::Shape::get_LastParagraph ( )

Gets the last paragraph in the shape.

◆ get_MarkupLanguage_ITextBox()

Aspose::Words::Drawing::ShapeMarkupLanguage Aspose::Words::Drawing::Shape::get_MarkupLanguage_ITextBox ( )

◆ get_NodeType()

virtual Aspose::Words::NodeType Aspose::Words::Drawing::Shape::get_NodeType ( ) const
virtual

◆ get_OleFormat()

System::SharedPtr<Aspose::Words::Drawing::OleFormat> Aspose::Words::Drawing::Shape::get_OleFormat ( )

Provides access to the OLE data of a shape. For a shape that is not an OLE object or ActiveX control, returns null.

◆ get_ShadowEnabled()

bool Aspose::Words::Drawing::Shape::get_ShadowEnabled ( )

Returns true if a shadow effect is enabled.

◆ get_StoryType()

Aspose::Words::StoryType Aspose::Words::Drawing::Shape::get_StoryType ( )

◆ get_Stroke()

System::SharedPtr<Aspose::Words::Drawing::Stroke> Aspose::Words::Drawing::Shape::get_Stroke ( )

Defines a stroke for a shape.

◆ get_StrokeColor()

System::Drawing::Color Aspose::Words::Drawing::Shape::get_StrokeColor ( )

Defines the color of a stroke.

This is a shortcut to the Aspose::Words::Drawing::Stroke::get_Color property.

The default value is System::Drawing::Color::get_Black.

◆ get_Stroked()

bool Aspose::Words::Drawing::Shape::get_Stroked ( )

Defines whether the path will be stroked.

This is a shortcut to the Aspose::Words::Drawing::Stroke::get_On property.

The default value is true.

◆ get_StrokeWeight()

double Aspose::Words::Drawing::Shape::get_StrokeWeight ( )

Defines the brush thickness that strokes the path of a shape in points.

This is a shortcut to the Aspose::Words::Drawing::Stroke::get_Weight property.

The default value is 0.75.

◆ get_TextBox()

System::SharedPtr<Aspose::Words::Drawing::TextBox> Aspose::Words::Drawing::Shape::get_TextBox ( )

Defines attributes that specify how text is displayed in a shape.

◆ get_TextboxLayoutFlow_ITextBox()

Aspose::Words::Drawing::LayoutFlow Aspose::Words::Drawing::Shape::get_TextboxLayoutFlow_ITextBox ( )

◆ get_TextBoxWrapMode_ITextBox()

Aspose::Words::Drawing::TextBoxWrapMode Aspose::Words::Drawing::Shape::get_TextBoxWrapMode_ITextBox ( )

◆ get_TextPath()

System::SharedPtr<Aspose::Words::Drawing::TextPath> Aspose::Words::Drawing::Shape::get_TextPath ( )

Defines the text of the text path (of a WordArt object).

◆ GetHorizontalMargins_ITextBox()

float Aspose::Words::Drawing::Shape::GetHorizontalMargins_ITextBox ( )

◆ set_FillColor()

void Aspose::Words::Drawing::Shape::set_FillColor ( System::Drawing::Color  value)

◆ set_Filled()

void Aspose::Words::Drawing::Shape::set_Filled ( bool  value)

◆ set_StrokeColor()

void Aspose::Words::Drawing::Shape::set_StrokeColor ( System::Drawing::Color  value)

◆ set_Stroked()

void Aspose::Words::Drawing::Shape::set_Stroked ( bool  value)

◆ set_StrokeWeight()

void Aspose::Words::Drawing::Shape::set_StrokeWeight ( double  value)