Represents a shape on a slide. More...

Inherits Aspose::Slides::IShape, and Aspose::Slides::IDOMObject.

Inherited by Aspose::Slides::GeometryShape, Aspose::Slides::GraphicalObject, and Aspose::Slides::GroupShape.

Public Member Functions

bool get_IsTextHolder () override
 Determines whether the shape is TextHolder_PPT. Read-only bool. More...
 
System::SharedPtr< IPlaceholderget_Placeholder () override
 Returns the placeholder for a shape. Returns null if the shape has no placeholder. Read-only IPlaceholder. More...
 
System::SharedPtr< ICustomDataget_CustomData () override
 Returns the shape's custom data. Read-only ICustomData. More...
 
System::SharedPtr< IShapeFrameget_RawFrame () override
 Returns the raw shape frame's properties. Read IShapeFrame. More...
 
void set_RawFrame (System::SharedPtr< IShapeFrame > value) override
 Sets the raw shape frame's properties. Write IShapeFrame. More...
 
System::SharedPtr< IShapeFrameget_Frame () override
 Returns the shape frame's properties. Read IShapeFrame. More...
 
void set_Frame (System::SharedPtr< IShapeFrame > value) override
 Sets the shape frame's properties. Write IShapeFrame. More...
 
System::SharedPtr< ILineFormatget_LineFormat () override
 Returns the LineFormat object that contains line formatting properties for a shape. Note: can return null for certain types of shapes which don't have line properties. Read-only ILineFormat. More...
 
System::SharedPtr< IThreeDFormatget_ThreeDFormat () override
 Returns the ThreeDFormat object that 3d effect properties for a shape. Note: can return null for certain types of shapes which don't have 3d properties. Read-only IThreeDFormat. More...
 
System::SharedPtr< IEffectFormatget_EffectFormat () override
 Returns the EffectFormat object which contains pixel effects applied to a shape. Note: can return null for certain types of shapes which don't have effect properties. Read-only IEffectFormat. More...
 
System::SharedPtr< IFillFormatget_FillFormat () override
 Returns the FillFormat object that contains fill formatting properties for a shape. Note: can return null for certain types of shapes which don't have fill properties. Read-only IFillFormat. More...
 
System::SharedPtr< IHyperlinkget_HyperlinkClick () override
 Returns the hyperlink defined for mouse click. Read IHyperlink. More...
 
void set_HyperlinkClick (System::SharedPtr< IHyperlink > value) override
 Sets the hyperlink defined for mouse click. Write IHyperlink. More...
 
System::SharedPtr< IHyperlinkget_HyperlinkMouseOver () override
 Returns the hyperlink defined for mouse over. Read IHyperlink. More...
 
void set_HyperlinkMouseOver (System::SharedPtr< IHyperlink > value) override
 Sets the hyperlink defined for mouse over. Write IHyperlink. More...
 
System::SharedPtr< IHyperlinkManagerget_HyperlinkManager () override
 Returns the hyperlink manager. Read-only IHyperlinkManager. More...
 
bool get_Hidden () override
 Determines whether the shape is hidden. Read bool. More...
 
void set_Hidden (bool value) override
 Determines whether the shape is hidden. Write bool. More...
 
int32_t get_ZOrderPosition () override
 Returns the position of a shape in the z-order. Shapes[0] returns the shape at the back of the z-order, and Shapes[Shapes.Count - 1] returns the shape at the front of the z-order. Read-only int32_t. More...
 
int32_t get_ConnectionSiteCount () override
 Returns the number of connection sites on the shape. Read-only int32_t. More...
 
float get_Rotation () override
 Returns the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read float. More...
 
void set_Rotation (float value) override
 Sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Write float. More...
 
float get_X () override
 Returns the x-coordinate of the upper-left corner of the shape. Read float. More...
 
void set_X (float value) override
 Sets the x-coordinate of the upper-left corner of the shape. Write float. More...
 
float get_Y () override
 Returns the y-coordinate of the upper-left corner of the shape. Read float. More...
 
void set_Y (float value) override
 Sets the y-coordinate of the upper-left corner of the shape. Write float. More...
 
float get_Width () override
 Returns the width of the shape. Read float. More...
 
void set_Width (float value) override
 Sets the width of the shape. Write float. More...
 
float get_Height () override
 Returns the height of the shape. Read float. More...
 
void set_Height (float value) override
 Sets the height of the shape. Write float. More...
 
Aspose::Slides::BlackWhiteMode get_BlackWhiteMode () override
 Property specifies how a shape will render in black-and-white display mode.. Read Slides::BlackWhiteMode. More...
 
void set_BlackWhiteMode (Aspose::Slides::BlackWhiteMode value) override
 Property specifies how a shape will render in black-and-white display mode.. Write Slides::BlackWhiteMode. More...
 
uint32_t get_UniqueId () override
 Gets unique shape identifier in presentation scope. Read-only uint32_t. See also Shape::get_OfficeInteropShapeId for getting unique shape identifier in slide scope. More...
 
uint32_t get_OfficeInteropShapeId () override
 Gets unique shape identifier in slide scope. Read-only uint32_t. See also Shape::get_UniqueId for getting unique shape identifier in presentation scope. More...
 
System::String get_AlternativeText () override
 Returns the alternative text associated with a shape. Read System::String. More...
 
void set_AlternativeText (System::String value) override
 Sets the alternative text associated with a shape. Write System::String. More...
 
System::String get_AlternativeTextTitle () override
 Returns the title of alternative text associated with a shape. Read System::String. More...
 
void set_AlternativeTextTitle (System::String value) override
 Sets the title of alternative text associated with a shape. Write System::String. More...
 
System::String get_Name () override
 Returns the name of a shape. Must be not null. Use empty string value if needed. Read System::String. More...
 
void set_Name (System::String value) override
 Sets the name of a shape. Must be not null. Use empty string value if needed. Write System::String. More...
 
System::SharedPtr< IBaseShapeLockget_ShapeLock () override
 Returns shape's locks. Read-only IBaseShapeLock. More...
 
bool get_IsGrouped () override
 Determines whether the shape is grouped. Read-only bool. More...
 
System::SharedPtr< IGroupShapeget_ParentGroup () override
 Returns parent GroupShape object if shape is grouped. Otherwise returns null. Read-only IGroupShape. More...
 
System::SharedPtr< IDOMObjectget_Parent_Immediate () override
 Returns Parent_Immediate object. Read-only IDOMObject. More...
 
System::SharedPtr< IBaseSlideget_Slide () override
 Returns the parent slide of a shape. Read-only IBaseSlide. More...
 
System::SharedPtr< IPresentationget_Presentation () override
 Returns the parent presentation of a slide. Read-only IPresentation. More...
 
void RemovePlaceholder () override
 Defines that this shape isn't a placeholder. More...
 
System::SharedPtr< IPlaceholderAddPlaceholder (System::SharedPtr< IPlaceholder > placeholderToCopyFrom) override
 Adds a new placeholder if there is no and sets placeholder properties to a specified one. More...
 
System::SharedPtr< System::Drawing::BitmapGetThumbnail () override
 Returns shape thumbnail. ShapeThumbnailBounds::Shape shape thumbnail bounds type is used by default. More...
 
System::SharedPtr< System::Drawing::BitmapGetThumbnail (ShapeThumbnailBounds bounds, float scaleX, float scaleY) override
 Returns shape thumbnail. More...
 
void WriteAsSvg (System::SharedPtr< System::IO::Stream > stream) override
 Saves content of Shape as SVG file. More...
 
void WriteAsSvg (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< Export::ISVGOptions > svgOptions) override
 Saves content of Shape as SVG file. 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 reference 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 int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () 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 (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

void set_ShapeLock (System::SharedPtr< IBaseShapeLock > value)
 Returns shape's locks. Read-only IBaseShapeLock. More...
 
virtual ~Shape ()
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. 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 ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

Represents a shape on a slide.

Constructor & Destructor Documentation

◆ ~Shape()

virtual Aspose::Slides::Shape::~Shape ( )
protectedvirtual

Member Function Documentation

◆ AddPlaceholder()

System::SharedPtr<IPlaceholder> Aspose::Slides::Shape::AddPlaceholder ( System::SharedPtr< IPlaceholder placeholderToCopyFrom)
overridevirtual

Adds a new placeholder if there is no and sets placeholder properties to a specified one.

Parameters
placeholderToCopyFromPlaceholder to copy content from.
Returns
New Shape::get_Placeholder.

Implements Aspose::Slides::IShape.

◆ get_AlternativeText()

System::String Aspose::Slides::Shape::get_AlternativeText ( )
overridevirtual

Returns the alternative text associated with a shape. Read System::String.

Implements Aspose::Slides::IShape.

◆ get_AlternativeTextTitle()

System::String Aspose::Slides::Shape::get_AlternativeTextTitle ( )
overridevirtual

Returns the title of alternative text associated with a shape. Read System::String.

Implements Aspose::Slides::IShape.

◆ get_BlackWhiteMode()

Aspose::Slides::BlackWhiteMode Aspose::Slides::Shape::get_BlackWhiteMode ( )
overridevirtual

Property specifies how a shape will render in black-and-white display mode.. Read Slides::BlackWhiteMode.

Implements Aspose::Slides::IShape.

◆ get_ConnectionSiteCount()

int32_t Aspose::Slides::Shape::get_ConnectionSiteCount ( )
overridevirtual

Returns the number of connection sites on the shape. Read-only int32_t.

Implements Aspose::Slides::IShape.

◆ get_CustomData()

System::SharedPtr<ICustomData> Aspose::Slides::Shape::get_CustomData ( )
overridevirtual

Returns the shape's custom data. Read-only ICustomData.

Implements Aspose::Slides::IShape.

◆ get_EffectFormat()

System::SharedPtr<IEffectFormat> Aspose::Slides::Shape::get_EffectFormat ( )
overridevirtual

Returns the EffectFormat object which contains pixel effects applied to a shape. Note: can return null for certain types of shapes which don't have effect properties. Read-only IEffectFormat.

Implements Aspose::Slides::IShape.

◆ get_FillFormat()

System::SharedPtr<IFillFormat> Aspose::Slides::Shape::get_FillFormat ( )
overridevirtual

Returns the FillFormat object that contains fill formatting properties for a shape. Note: can return null for certain types of shapes which don't have fill properties. Read-only IFillFormat.

Implements Aspose::Slides::IShape.

Reimplemented in Aspose::Slides::Table.

◆ get_Frame()

System::SharedPtr<IShapeFrame> Aspose::Slides::Shape::get_Frame ( )
overridevirtual

Returns the shape frame's properties. Read IShapeFrame.

Value of each property of the returned IShapeFrame instance is not undefined (is not NaN or NotDefined). Value of each property of the assigned IShapeFrame instance must be not undefined (must be not NaN or NotDefined). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ get_Height()

float Aspose::Slides::Shape::get_Height ( )
overridevirtual

Returns the height of the shape. Read float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ get_Hidden()

bool Aspose::Slides::Shape::get_Hidden ( )
overridevirtual

Determines whether the shape is hidden. Read bool.

Implements Aspose::Slides::IShape.

◆ get_HyperlinkClick()

System::SharedPtr<IHyperlink> Aspose::Slides::Shape::get_HyperlinkClick ( )
overridevirtual

Returns the hyperlink defined for mouse click. Read IHyperlink.

Implements Aspose::Slides::IHyperlinkContainer.

◆ get_HyperlinkManager()

System::SharedPtr<IHyperlinkManager> Aspose::Slides::Shape::get_HyperlinkManager ( )
overridevirtual

Returns the hyperlink manager. Read-only IHyperlinkManager.

Implements Aspose::Slides::IHyperlinkContainer.

◆ get_HyperlinkMouseOver()

System::SharedPtr<IHyperlink> Aspose::Slides::Shape::get_HyperlinkMouseOver ( )
overridevirtual

Returns the hyperlink defined for mouse over. Read IHyperlink.

Implements Aspose::Slides::IHyperlinkContainer.

◆ get_IsGrouped()

bool Aspose::Slides::Shape::get_IsGrouped ( )
overridevirtual

Determines whether the shape is grouped. Read-only bool.

Property Shape::get_ParentGroup returns parent GroupShape object if shape is grouped.

Implements Aspose::Slides::IShape.

◆ get_IsTextHolder()

bool Aspose::Slides::Shape::get_IsTextHolder ( )
overridevirtual

Determines whether the shape is TextHolder_PPT. Read-only bool.

Implements Aspose::Slides::IShape.

◆ get_LineFormat()

System::SharedPtr<ILineFormat> Aspose::Slides::Shape::get_LineFormat ( )
overridevirtual

Returns the LineFormat object that contains line formatting properties for a shape. Note: can return null for certain types of shapes which don't have line properties. Read-only ILineFormat.

Implements Aspose::Slides::IShape.

◆ get_Name()

System::String Aspose::Slides::Shape::get_Name ( )
overridevirtual

Returns the name of a shape. Must be not null. Use empty string value if needed. Read System::String.

Implements Aspose::Slides::IShape.

◆ get_OfficeInteropShapeId()

uint32_t Aspose::Slides::Shape::get_OfficeInteropShapeId ( )
overridevirtual

Gets unique shape identifier in slide scope. Read-only uint32_t. See also Shape::get_UniqueId for getting unique shape identifier in presentation scope.

Implements Aspose::Slides::IShape.

◆ get_Parent_Immediate()

System::SharedPtr<IDOMObject> Aspose::Slides::Shape::get_Parent_Immediate ( )
overridevirtual

Returns Parent_Immediate object. Read-only IDOMObject.

Implements Aspose::Slides::IDOMObject.

◆ get_ParentGroup()

System::SharedPtr<IGroupShape> Aspose::Slides::Shape::get_ParentGroup ( )
overridevirtual

Returns parent GroupShape object if shape is grouped. Otherwise returns null. Read-only IGroupShape.

Property Shape::get_IsGrouped determines whether the shape is grouped.

Implements Aspose::Slides::IShape.

◆ get_Placeholder()

System::SharedPtr<IPlaceholder> Aspose::Slides::Shape::get_Placeholder ( )
overridevirtual

Returns the placeholder for a shape. Returns null if the shape has no placeholder. Read-only IPlaceholder.

Implements Aspose::Slides::IShape.

◆ get_Presentation()

System::SharedPtr<IPresentation> Aspose::Slides::Shape::get_Presentation ( )
overridevirtual

Returns the parent presentation of a slide. Read-only IPresentation.

Implements Aspose::Slides::IPresentationComponent.

◆ get_RawFrame()

System::SharedPtr<IShapeFrame> Aspose::Slides::Shape::get_RawFrame ( )
overridevirtual

Returns the raw shape frame's properties. Read IShapeFrame.

Code that attempts to assign undefined frame to IShape::set_Frame doesn't make sence in general case (particulary in case when parent GroupShape is multiple nested into other GroupShape-s). For example:

SharedPtr<IShape> shape = ...;
shape->set_Frame(System::MakeObject<ShapeFrame>(std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(), NullableBool::NotDefined,
NullableBool::NotDefined, std::numeric_limits<float>::quiet_NaN()));

or

slide->get_Shapes()->AddAutoShape(ShapeType::RoundCornerRectangle,
std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN());

Such code can lead to unclear situations. So restrictions had been added for using undefined values for IShape::set_Frame. Values of x, y, width, height, flipH, flipV and rotationAngle must be defined (not std::numeric_limits<float>::quiet_NaN() or NullableBool::NotDefined). Example code above now throws ArgumentException exception. This applies to these use cases:

SharedPtr<IShape> shape = ...;
shape->set_Frame(...); // cannot be undefined
SharedPtr<IShapeCollection> shapes = ...;
// x, y, width, height parameters cannot be std::numeric_limits<float>::quiet_NaN():
{
shapes->AddAudioFrameCD(...);
shapes->AddAudioFrameEmbedded(...);
shapes->AddAudioFrameLinked(...);
shapes->AddAutoShape(...);
shapes->AddChart(...);
shapes->AddConnector(...);
shapes->AddOleObjectFrame(...);
shapes->AddPictureFrame(...);
shapes->AddSmartArt(...);
shapes->AddTable(...);
shapes->AddVideoFrame(...);
shapes->InsertAudioFrameEmbedded(...);
shapes->InsertAudioFrameLinked(...);
shapes->InsertAutoShape(...);
shapes->InsertChart(...);
shapes->InsertConnector(...);
shapes->InsertOleObjectFrame(...);
shapes->InsertPictureFrame(...);
shapes->InsertTable(...);
shapes->InsertVideoFrame(...);
}

But a frame for IShape::set_RawFrame method can be undefined. This make sence when shape is linked to placeholder. Then undefined shape frame values is overridden from the parent placeholder shape. If there is no parent placeholder shape for that shape then that shape uses default values when it evaluates effective frame based on its IShape::get_RawFrame. Default values are 0 and NullableBool::False for x, y, width, height, flipH, flipV and rotationAngle. For example:

SharedPtr<IShape> shape = ...; // shape is linked to placeholder
shape->set_RawFrame(System::MakeObject<ShapeFrame>(std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(), 100.0f, std::numeric_limits<float>::quiet_NaN(),
NullableBool::NotDefined, NullableBool::NotDefined, 0.0f)); // now shape inherits x, y, height, flipH, flipV values form placeholder and overrides width=100 and rotationAngle=0.

Implements Aspose::Slides::IShape.

◆ get_Rotation()

float Aspose::Slides::Shape::get_Rotation ( )
overridevirtual

Returns the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ get_ShapeLock()

System::SharedPtr<IBaseShapeLock> Aspose::Slides::Shape::get_ShapeLock ( )
overridevirtual

Returns shape's locks. Read-only IBaseShapeLock.

Implements Aspose::Slides::IShape.

◆ get_Slide()

System::SharedPtr<IBaseSlide> Aspose::Slides::Shape::get_Slide ( )
overridevirtual

Returns the parent slide of a shape. Read-only IBaseSlide.

Implements Aspose::Slides::ISlideComponent.

◆ get_ThreeDFormat()

System::SharedPtr<IThreeDFormat> Aspose::Slides::Shape::get_ThreeDFormat ( )
overridevirtual

Returns the ThreeDFormat object that 3d effect properties for a shape. Note: can return null for certain types of shapes which don't have 3d properties. Read-only IThreeDFormat.

Implements Aspose::Slides::IShape.

◆ get_UniqueId()

uint32_t Aspose::Slides::Shape::get_UniqueId ( )
overridevirtual

Gets unique shape identifier in presentation scope. Read-only uint32_t. See also Shape::get_OfficeInteropShapeId for getting unique shape identifier in slide scope.

Implements Aspose::Slides::IShape.

◆ get_Width()

float Aspose::Slides::Shape::get_Width ( )
overridevirtual

Returns the width of the shape. Read float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ get_X()

float Aspose::Slides::Shape::get_X ( )
overridevirtual

Returns the x-coordinate of the upper-left corner of the shape. Read float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ get_Y()

float Aspose::Slides::Shape::get_Y ( )
overridevirtual

Returns the y-coordinate of the upper-left corner of the shape. Read float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ get_ZOrderPosition()

int32_t Aspose::Slides::Shape::get_ZOrderPosition ( )
overridevirtual

Returns the position of a shape in the z-order. Shapes[0] returns the shape at the back of the z-order, and Shapes[Shapes.Count - 1] returns the shape at the front of the z-order. Read-only int32_t.

Implements Aspose::Slides::IShape.

◆ GetThumbnail() [1/2]

System::SharedPtr<System::Drawing::Bitmap> Aspose::Slides::Shape::GetThumbnail ( )
overridevirtual

Returns shape thumbnail. ShapeThumbnailBounds::Shape shape thumbnail bounds type is used by default.

Returns
Shape thumbnail.

Implements Aspose::Slides::IShape.

◆ GetThumbnail() [2/2]

System::SharedPtr<System::Drawing::Bitmap> Aspose::Slides::Shape::GetThumbnail ( ShapeThumbnailBounds  bounds,
float  scaleX,
float  scaleY 
)
overridevirtual

Returns shape thumbnail.

Parameters
boundsShape thumbnail bounds type.
scaleXX scale
scaleYY scale
Returns
Shape thumbnail or null in case when ShapeThumbnailBounds::Appearance is used and a shape doesn't have visible elements.

Implements Aspose::Slides::IShape.

◆ RemovePlaceholder()

void Aspose::Slides::Shape::RemovePlaceholder ( )
overridevirtual

Defines that this shape isn't a placeholder.

Implements Aspose::Slides::IShape.

◆ set_AlternativeText()

void Aspose::Slides::Shape::set_AlternativeText ( System::String  value)
overridevirtual

Sets the alternative text associated with a shape. Write System::String.

Implements Aspose::Slides::IShape.

◆ set_AlternativeTextTitle()

void Aspose::Slides::Shape::set_AlternativeTextTitle ( System::String  value)
overridevirtual

Sets the title of alternative text associated with a shape. Write System::String.

Implements Aspose::Slides::IShape.

◆ set_BlackWhiteMode()

void Aspose::Slides::Shape::set_BlackWhiteMode ( Aspose::Slides::BlackWhiteMode  value)
overridevirtual

Property specifies how a shape will render in black-and-white display mode.. Write Slides::BlackWhiteMode.

Implements Aspose::Slides::IShape.

◆ set_Frame()

void Aspose::Slides::Shape::set_Frame ( System::SharedPtr< IShapeFrame value)
overridevirtual

Sets the shape frame's properties. Write IShapeFrame.

Value of each property of the returned IShapeFrame instance is not undefined (is not NaN or NotDefined). Value of each property of the assigned IShapeFrame instance must be not undefined (must be not NaN or NotDefined). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ set_Height()

void Aspose::Slides::Shape::set_Height ( float  value)
overridevirtual

Sets the height of the shape. Write float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ set_Hidden()

void Aspose::Slides::Shape::set_Hidden ( bool  value)
overridevirtual

Determines whether the shape is hidden. Write bool.

Implements Aspose::Slides::IShape.

◆ set_HyperlinkClick()

void Aspose::Slides::Shape::set_HyperlinkClick ( System::SharedPtr< IHyperlink value)
overridevirtual

Sets the hyperlink defined for mouse click. Write IHyperlink.

Implements Aspose::Slides::IHyperlinkContainer.

◆ set_HyperlinkMouseOver()

void Aspose::Slides::Shape::set_HyperlinkMouseOver ( System::SharedPtr< IHyperlink value)
overridevirtual

Sets the hyperlink defined for mouse over. Write IHyperlink.

Implements Aspose::Slides::IHyperlinkContainer.

◆ set_Name()

void Aspose::Slides::Shape::set_Name ( System::String  value)
overridevirtual

Sets the name of a shape. Must be not null. Use empty string value if needed. Write System::String.

Implements Aspose::Slides::IShape.

◆ set_RawFrame()

void Aspose::Slides::Shape::set_RawFrame ( System::SharedPtr< IShapeFrame value)
overridevirtual

Sets the raw shape frame's properties. Write IShapeFrame.

Code that attempts to assign undefined frame to IShape::set_Frame doesn't make sence in general case (particulary in case when parent GroupShape is multiple nested into other GroupShape-s). For example:

SharedPtr<IShape> shape = ...;
shape->set_Frame(System::MakeObject<ShapeFrame>(std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(), NullableBool::NotDefined,
NullableBool::NotDefined, std::numeric_limits<float>::quiet_NaN()));

or

slide->get_Shapes()->AddAutoShape(ShapeType::RoundCornerRectangle,
std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN());

Such code can lead to unclear situations. So restrictions had been added for using undefined values for IShape::set_Frame. Values of x, y, width, height, flipH, flipV and rotationAngle must be defined (not std::numeric_limits<float>::quiet_NaN() or NullableBool::NotDefined). Example code above now throws ArgumentException exception. This applies to these use cases:

SharedPtr<IShape> shape = ...;
shape->set_Frame(...); // cannot be undefined
SharedPtr<IShapeCollection> shapes = ...;
// x, y, width, height parameters cannot be std::numeric_limits<float>::quiet_NaN():
{
shapes->AddAudioFrameCD(...);
shapes->AddAudioFrameEmbedded(...);
shapes->AddAudioFrameLinked(...);
shapes->AddAutoShape(...);
shapes->AddChart(...);
shapes->AddConnector(...);
shapes->AddOleObjectFrame(...);
shapes->AddPictureFrame(...);
shapes->AddSmartArt(...);
shapes->AddTable(...);
shapes->AddVideoFrame(...);
shapes->InsertAudioFrameEmbedded(...);
shapes->InsertAudioFrameLinked(...);
shapes->InsertAutoShape(...);
shapes->InsertChart(...);
shapes->InsertConnector(...);
shapes->InsertOleObjectFrame(...);
shapes->InsertPictureFrame(...);
shapes->InsertTable(...);
shapes->InsertVideoFrame(...);
}

But a frame for IShape::set_RawFrame method can be undefined. This make sence when shape is linked to placeholder. Then undefined shape frame values is overridden from the parent placeholder shape. If there is no parent placeholder shape for that shape then that shape uses default values when it evaluates effective frame based on its IShape::get_RawFrame. Default values are 0 and NullableBool::False for x, y, width, height, flipH, flipV and rotationAngle. For example:

SharedPtr<IShape> shape = ...; // shape is linked to placeholder
shape->set_RawFrame(System::MakeObject<ShapeFrame>(std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(), 100.0f, std::numeric_limits<float>::quiet_NaN(),
NullableBool::NotDefined, NullableBool::NotDefined, 0.0f)); // now shape inherits x, y, height, flipH, flipV values form placeholder and overrides width=100 and rotationAngle=0.

Implements Aspose::Slides::IShape.

◆ set_Rotation()

void Aspose::Slides::Shape::set_Rotation ( float  value)
overridevirtual

Sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Write float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ set_ShapeLock()

void Aspose::Slides::Shape::set_ShapeLock ( System::SharedPtr< IBaseShapeLock value)
protected

Returns shape's locks. Read-only IBaseShapeLock.

◆ set_Width()

void Aspose::Slides::Shape::set_Width ( float  value)
overridevirtual

Sets the width of the shape. Write float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ set_X()

void Aspose::Slides::Shape::set_X ( float  value)
overridevirtual

Sets the x-coordinate of the upper-left corner of the shape. Write float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ set_Y()

void Aspose::Slides::Shape::set_Y ( float  value)
overridevirtual

Sets the y-coordinate of the upper-left corner of the shape. Write float.

Returned value is always defined (is not std::numeric_limits<float>::quiet_NaN()). Assigned value must be defined (not std::numeric_limits<float>::quiet_NaN()). You can set undefined values for RawFrame instance properties.

Implements Aspose::Slides::IShape.

◆ WriteAsSvg() [1/2]

void Aspose::Slides::Shape::WriteAsSvg ( System::SharedPtr< System::IO::Stream stream)
overridevirtual

Saves content of Shape as SVG file.

Parameters
streamTarget stream

Implements Aspose::Slides::IShape.

◆ WriteAsSvg() [2/2]

void Aspose::Slides::Shape::WriteAsSvg ( System::SharedPtr< System::IO::Stream stream,
System::SharedPtr< Export::ISVGOptions svgOptions 
)
overridevirtual

Saves content of Shape as SVG file.

Parameters
streamTarget stream
svgOptionsSVG generation options

Implements Aspose::Slides::IShape.