Shape

Overview

Shape is a class in Aspose.Slides FOSS for C++.

Base class for all shapes on a slide.

Properties

NameTypeAccessDescription
ShapeTypeShapeTypeReadProperty gets or sets the shape’s type
EffectFormatEffectFormatReadProperty provides access to the shape’s effect formatting
FillFormatFillFormatReadReturns the fill formatting object for the shape
LineFormatLineFormatReadProperty provides access to the shape’s line formatting
ThreeDFormatThreeDFormatReadProperty provides access to the shape’s 3‑D formatting
ShapeFrameShapeFrameReadProperty provides access to the shape’s frame data
ISlideComponentISlideComponentReadReturns the slide component interface implemented by the shape
IPresentationIPresentationReadProperty references the presentation interface containing the shape
IBaseSlideIBaseSlideReadProperty references the base slide interface that holds the shape
IPresentationComponentIPresentationComponentReadReturns the presentation component interface of the shape

Methods

SignatureDescription
ShapeType()ShapeTypeProperty gets or sets the shape’s type
EffectFormat()EffectFormatProperty provides access to the shape’s effect formatting
EffectFormat()EffectFormat
FillFormat()FillFormatReturns the fill formatting object for the shape
FillFormat()FillFormat
LineFormat()LineFormatProperty provides access to the shape’s line formatting
LineFormat()LineFormat
ThreeDFormat()ThreeDFormatProperty provides access to the shape’s 3‑D formatting
ThreeDFormat()ThreeDFormat
ShapeFrame()ShapeFrameProperty provides access to the shape’s frame data
ShapeFrame()ShapeFrame
ISlideComponent()ISlideComponentReturns the slide component interface implemented by the shape
IPresentation()IPresentationProperty references the presentation interface containing the shape
IPresentation()IPresentation
IBaseSlide()IBaseSlideProperty references the base slide interface that holds the shape
IBaseSlide()IBaseSlide
IPresentationComponent()IPresentationComponentReturns 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()ShapeFrameBuild 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_nodeGet the spPr (or grpSpPr) element for this shape.
ensure_sp_pr()pugi::xml_nodeGet or create the spPr element.
get_c_nv_pr()pugi::xml_nodeGet the cNvPr element from the shape XML.
find_xfrm_in_element(xml_element: pugi::xml_node)pugi::xml_nodeFind 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_nodeFind the xfrm for a matching placeholder in a layout/master XML root.
get_inherited_xfrm()pugi::xml_nodeWalk the layout -> master chain to find inherited xfrm for placeholders.
get_xfrm()pugi::xml_nodeGet the a:xfrm element from the shape XML, with placeholder inheritance.
ensure_xfrm()pugi::xml_nodeGet or create the a:xfrm element.