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.
This class provides 61 methods for working with Shape objects in Java programs.
Available methods include: GeometryShape, Shape, applyFrame, asIPresentationComponent, buildFrame, ensureSpPr, ensureXfrm, findPlaceholderXfrmInXml, findXfrmInElement, getAdjustments, getAlternativeText, getAlternativeTextTitle, and 48 additional methods.
All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.
Properties: adjustments, alternativeText, alternativeTextTitle, asISlideComponent, cNvPr, connectionSiteCount, and 29 more.
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 the raw frame. |
frame | IShapeFrame | Read | Gets the frame. |
slide | IBaseSlide | Read | Gets the slide. |
presentation | IPresentation | Read | Gets the presentation. |
x | double | Read | Gets the x. |
y | double | Read | Gets the y. |
width | double | Read | Gets the width. |
height | double | Read | Gets the height. |
rotation | double | Read | Gets the rotation. |
shapeStyle | IShapeStyle | Read | Gets the shape style. |
shapeType | ShapeType | Read | Gets the shape type. |
fillFormat | IFillFormat | Read | Gets the fill format. |
adjustments | IAdjustValueCollection | Read | Gets the adjustments. |
textHolder | boolean | Read | Gets the text holder. |
placeholder | IPlaceholder | Read | Gets the placeholder. |
customData | ICustomData | Read | Gets the custom data. |
lineFormat | ILineFormat | Read | Gets the line format. |
threeDFormat | IThreeDFormat | Read | Gets the three d format. |
effectFormat | IEffectFormat | Read | Gets the effect format. |
hidden | boolean | Read | Gets the hidden. |
zOrderPosition | int | Read | Gets the z order position. |
connectionSiteCount | int | Read | Gets the connection site count. |
alternativeText | String | Read | Gets the alternative text. |
alternativeTextTitle | String | Read | Gets the alternative text title. |
name | String | Read | Gets the name. |
decorative | boolean | Read | Gets the decorative. |
uniqueId | int | Read | Gets the unique id. |
officeInteropShapeId | int | Read | Gets the office interop shape id. |
grouped | boolean | Read | Gets the grouped. |
asISlideComponent | ISlideComponent | Read | Gets the as i slide component. |
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 frame. |
setRawFrame(value: IShapeFrame) | Sets the raw frame value. |
getFrame() → IShapeFrame | Returns the frame. |
setFrame(value: IShapeFrame) | Sets the frame value. |
getSlide() → IBaseSlide | Returns the slide. |
getPresentation() → IPresentation | Returns the presentation. |
asIPresentationComponent() → IPresentationComponent | Casts the shape to an IPresentationComponent |
setParentSlide(slide: IBaseSlide) | Sets the parent slide for this shape. |
GeometryShape(xmlElement: Element, saveCallback: Runnable) | Creates a GeometryShape backed by the given XML element. |
setParentShapes(shapes: Iterable<IShape>) | Sets the sibling shapes collection used for connection lookups. |
getX() → double | Returns the x. |
setX(x: double) | Sets the x value. |
getY() → double | Returns the y. |
setY(y: double) | Sets the y value. |
getWidth() → double | Returns the width. |
setWidth(width: double) | Sets the width value. |
getHeight() → double | Returns the height. |
setHeight(height: double) | Sets the height value. |
getRotation() → double | Returns the rotation. |
setRotation(rotation: double) | Sets the rotation value. |
getShapeStyle() → IShapeStyle | Returns the shape style. |
getShapeType() → ShapeType | Returns the shape type. |
setShapeType(value: ShapeType) | Sets the shape type value. |
getFillFormat() → IFillFormat | Returns the fill format. |
getAdjustments() → IAdjustValueCollection | Returns the adjustments. |
isTextHolder() → boolean | Returns true if text holder is set. |
getPlaceholder() → IPlaceholder | Returns the placeholder. |
getCustomData() → ICustomData | Returns the custom data. |
getLineFormat() → ILineFormat | Returns the line format. |
getThreeDFormat() → IThreeDFormat | Returns the three d format. |
getEffectFormat() → IEffectFormat | Returns the effect format. |
isHidden() → boolean | Returns true if hidden is set. |
setHidden(value: boolean) | Sets the hidden value. |
getZOrderPosition() → int | Returns the z order position. |
getConnectionSiteCount() → int | Returns the connection site count. |
getAlternativeText() → String | Returns the alternative text. |
setAlternativeText(value: String) | Sets the alternative text value. |
getAlternativeTextTitle() → String | Returns the alternative text title. |
setAlternativeTextTitle(value: String) | Sets the alternative text title value. |
getName() → String | Returns the name. |
setName(value: String) | Sets the name value. |
isDecorative() → boolean | Returns true if decorative is set. |
setDecorative(value: boolean) | Sets the decorative value. |
getUniqueId() → int | Returns the unique id. |
getOfficeInteropShapeId() → int | Returns the office interop shape id. |
isGrouped() → boolean | Returns true if grouped is set. |
getAsISlideComponent() → ISlideComponent | Returns the as i slide component. |