Shape — Aspose.Slides FOSS for C++ API Reference
The Shape class is the base class for all visual elements on a slide. AutoShape extends Shape with geometry and an optional TextFrame.
Namespace: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/shape.h>
#include <Aspose/Slides/Foss/auto_shape.h>Headers: include/Aspose/Slides/Foss/shape.h, include/Aspose/Slides/Foss/auto_shape.h
Shape Properties
| Property | Accessor | Description |
|---|---|---|
x() / set_x(float) | Read/Write | X position in points. |
y() / set_y(float) | Read/Write | Y position in points. |
width() / set_width(float) | Read/Write | Width in points. |
height() / set_height(float) | Read/Write | Height in points. |
rotation() / set_rotation(float) | Read/Write | Rotation angle in degrees. |
hidden() / set_hidden(bool) | Read/Write | Whether the shape is hidden. |
shape_type() / set_shape_type(ShapeType) | Read/Write | The geometry type of the shape. |
z_order_position() | Read | Z-order stacking position. |
unique_id() | Read | Unique identifier for this shape. |
office_interop_shape_id() | Read | Office interop shape ID. |
is_grouped() | Read | Whether the shape belongs to a group. |
is_text_holder() | Read | Whether the shape can hold text. |
is_decorative() / set_is_decorative(bool) | Read/Write | Whether the shape is decorative (accessibility). |
connection_site_count() | Read | Number of connection sites. |
set_name(const std::string&) | Write | Set the shape name. |
set_alternative_text(const std::string&) | Write | Set alt text for accessibility. |
set_alternative_text_title(const std::string&) | Write | Set alt text title. |
Shape Format Properties
| Property | Type | Description |
|---|---|---|
fill_format() | FillFormat& | Fill settings for this shape. |
line_format() | LineFormat& | Line/border settings. |
effect_format() | EffectFormat& | Visual effect settings. |
three_d_format() | ThreeDFormat& | 3-D effect settings. |
frame() | ShapeFrame | Position and size frame. |
AutoShape
AutoShape inherits from GeometryShape (which inherits from Shape) and adds a TextFrame.
| Property | Accessor | Description |
|---|---|---|
text_frame() | Read | Returns the TextFrame for this auto shape. |
geometry_shape() | Read | Returns the geometry shape properties. |
IShape Interface
The IShape interface defines the public contract. Key methods from IShape:
| Method | Description |
|---|---|
set_raw_frame(const ShapeFrame&) | Set the raw frame directly. |
set_frame(const ShapeFrame&) | Set the computed frame. |