Shape
Overview
Shape is a class in Aspose.Slides FOSS for C++.
Base class for all shapes on a slide.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
ShapeType | ShapeType | Read | Property gets or sets the shape’s type |
EffectFormat | EffectFormat | Read | Property provides access to the shape’s effect formatting |
FillFormat | FillFormat | Read | Returns the fill formatting object for the shape |
LineFormat | LineFormat | Read | Property provides access to the shape’s line formatting |
ThreeDFormat | ThreeDFormat | Read | Property provides access to the shape’s 3‑D formatting |
ShapeFrame | ShapeFrame | Read | Property provides access to the shape’s frame data |
ISlideComponent | ISlideComponent | Read | Returns the slide component interface implemented by the shape |
IPresentation | IPresentation | Read | Property references the presentation interface containing the shape |
IBaseSlide | IBaseSlide | Read | Property references the base slide interface that holds the shape |
IPresentationComponent | IPresentationComponent | Read | Returns the presentation component interface of the shape |
Methods
| Signature | Description |
|---|---|
ShapeType() → ShapeType | Property gets or sets the shape’s type |
EffectFormat() → EffectFormat | Property provides access to the shape’s effect formatting |
EffectFormat() → EffectFormat | |
FillFormat() → FillFormat | Returns the fill formatting object for the shape |
FillFormat() → FillFormat | |
LineFormat() → LineFormat | Property provides access to the shape’s line formatting |
LineFormat() → LineFormat | |
ThreeDFormat() → ThreeDFormat | Property provides access to the shape’s 3‑D formatting |
ThreeDFormat() → ThreeDFormat | |
ShapeFrame() → ShapeFrame | Property provides access to the shape’s frame data |
ShapeFrame() → ShapeFrame | |
ISlideComponent() → ISlideComponent | Returns the slide component interface implemented by the shape |
IPresentation() → IPresentation | Property references the presentation interface containing the shape |
IPresentation() → IPresentation | |
IBaseSlide() → IBaseSlide | Property references the base slide interface that holds the shape |
IBaseSlide() → IBaseSlide | |
IPresentationComponent() → IPresentationComponent | Returns the presentation component interface of the shape |
IPresentationComponent() → IPresentationComponent | |
set_x(value: double) | Sets the shape’s X coordinate |
set_y(value: double) | Sets the shape’s Y coordinate |
set_width(value: double) | |
set_height(value: double) | |
set_rotation(value: double) | Sets the shape’s rotation angle |
init_internal(xml_element: pugi::xml_node, slide_part: Internal::pptx::SlidePart, parent_slide: IBaseSlide) | Initialize this shape from an XML element within a slide part. |
build_frame() → ShapeFrame | Build a ShapeFrame from the current xfrm element. |
apply_frame(value: IShapeFrame) | Apply a ShapeFrame’s values to the xfrm element. |
get_sp_pr() → pugi::xml_node | Get the spPr (or grpSpPr) element for this shape. |
ensure_sp_pr() → pugi::xml_node | Get or create the spPr element. |
get_c_nv_pr() → pugi::xml_node | Get the cNvPr element from the shape XML. |
find_xfrm_in_element(xml_element: pugi::xml_node) → pugi::xml_node | Find the a:xfrm element directly within a shape XML element. |
get_placeholder_info() → std::optional<std::pair<std::optional<std::string>, std::string>> | |
find_placeholder_xfrm_in_xml(root: pugi::xml_node, ph_type: std::optional<std::string>, ph_idx: std::string_view) → pugi::xml_node | Find the xfrm for a matching placeholder in a layout/master XML root. |
get_inherited_xfrm() → pugi::xml_node | Walk the layout -> master chain to find inherited xfrm for placeholders. |
get_xfrm() → pugi::xml_node | Get the a:xfrm element from the shape XML, with placeholder inheritance. |
ensure_xfrm() → pugi::xml_node | Get or create the a:xfrm element. |