Shape
Overview
Shape is a class in Aspose.Slides FOSS for Java.
Inherits from: GeometryShape, IShape, ISlideComponent.
Abstract base class for shapes on a slide.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
spPr | Element | Read | Returns the {@code <p:spPr>} (or {@code <p:grpSpPr>}) element for this shape. |
cNvPr | Element | Read | Returns the {@code <p:cNvPr>} element from the shape XML. |
placeholderInfo | Optional<String[]> | Read | Returns placeholder information for this shape, if it is a placeholder. |
inheritedXfrm | Element | Read | Walks the layout → master chain to find an inherited {@code <a:xfrm>} |
| for placeholder shapes. | |||
xfrm | Element | Read | Returns the {@code <a:xfrm>} element for this shape. |
rawFrame | IShapeFrame | Read | Gets or sets the raw IShapeFrame of the shape |
frame | IShapeFrame | Read | Gets or sets the IShapeFrame representing the shape’s frame |
slide | IBaseSlide | Read | Gets the parent IBaseSlide of the shape |
presentation | IPresentation | Read | Gets the IPresentation that contains the shape |
Methods
| Signature | Description |
|---|---|
Shape(xmlElement: Element, saveCallback: Runnable) | Creates a Shape backed by the given XML element. |
Shape() | Creates a Shape with no backing element. |
initInternal(xmlElement: Element, opcPackage: OpcPackage, layoutPartName: String, saveCallback: Runnable, parentSlide: IBaseSlide) | Internal initialization with XML element, OPC package, layout part, and parent slide. |
buildFrame() → IShapeFrame | Builds a {@link ShapeFrame} from the current {@code <a:xfrm>} element. |
applyFrame(value: IShapeFrame) | Applies a {@link IShapeFrame}’s values to the {@code <a:xfrm>} element. |
getSpPr() → Element | Returns the {@code <p:spPr>} (or {@code <p:grpSpPr>}) element for this shape. |
ensureSpPr() → Element | Returns or creates the {@code <p:spPr>} element for this shape. |
getCNvPr() → Element | Returns the {@code <p:cNvPr>} element from the shape XML. |
findXfrmInElement(shapeElement: Element) → Element | Finds the {@code <a:xfrm>} element directly within a shape XML element. |
getPlaceholderInfo() → Optional<String[]> | Returns placeholder information for this shape, if it is a placeholder. |
findPlaceholderXfrmInXml(root: Element, phType: String, phIdx: String) → Element | Finds the {@code <a:xfrm>} for a matching placeholder in a layout or master XML root. |
getInheritedXfrm() → Element | Walks the layout → master chain to find an inherited {@code <a:xfrm>} |
| for placeholder shapes. | |
getXfrm() → Element | Returns the {@code <a:xfrm>} element for this shape. |
ensureXfrm() → Element | Returns or creates the {@code <a:xfrm>} element for this shape. |
getRawFrame() → IShapeFrame | Returns the raw IShapeFrame of the shape |
setRawFrame(value: IShapeFrame) | Sets the raw IShapeFrame of the shape |
getFrame() → IShapeFrame | Returns the IShapeFrame representing the shape’s frame |
setFrame(value: IShapeFrame) | Sets the shape’s frame using an IShapeFrame |
getSlide() → IBaseSlide | |
getPresentation() → IPresentation | Returns the presentation containing the shape |
asIPresentationComponent() → IPresentationComponent | |
setParentSlide(slide: IBaseSlide) | Sets the parent slide for this shape. |