Shape

Shape class

Represents a shape on a slide.

addPlaceholder

NameDescription
addPlaceholder (Placeholder)Adds a new placeholder if there is no and sets placeholder properties to a specified one.

Parameters:

NameTypeDescription
placeholderToCopyFromPlaceholderPlaceholder to copy content from.

Returns: Placeholder


getAlternativeText

NameDescription
getAlternativeText ()Returns or sets the alternative text associated with a shape. Read/write String.

Returns: String


getAlternativeTextTitle

NameDescription
getAlternativeTextTitle ()Returns or sets the title of alternative text associated with a shape. Read/write String.

Returns: String


getBasePlaceholder

NameDescription
getBasePlaceholder ()Returns a basic placeholder shape (shape from the layout and/or master slide that the current shape is inherited from). A null is returned if the current shape is not inherited.

Returns: Connector, GraphicalObject, Table, SmartArtShape, Shape, Ink, SummaryZoomFrame, GeometryShape, ZoomFrame, SummaryZoomSection, OleObjectFrame, VideoFrame, SmartArt, GroupShape, AutoShape, SectionZoomFrame, PictureFrame, Chart, AudioFrame, LegacyDiagram, ZoomObject


getBlackWhiteMode

NameDescription
getBlackWhiteMode ()Property specifies how a shape will render in black-and-white display mode.. Read/write BlackWhiteMode.

Returns: byte


getConnectionSiteCount

NameDescription
getConnectionSiteCount ()Returns the number of connection sites on the shape. Read-only int.

Returns: int


getCustomData

NameDescription
getCustomData ()Returns the shape’s custom data. Read-only ICustomData.

Returns: CustomData


getEffectFormat

NameDescription
getEffectFormat ()Returns the EffectFormat object which contains pixel effects applied to a shape. Note: can return null for certain types of shapes which don’t have effect properties. Read-only IEffectFormat.

Returns: EffectFormat


getFillFormat

NameDescription
getFillFormat ()Returns the FillFormat object that contains fill formatting properties for a shape. Note: can return null for certain types of shapes which don’t have fill properties. Read-only IFillFormat.

Returns: FillFormat


getFrame

NameDescription
getFrame ()Returns or sets the shape frame’s properties. Read/write IShapeFrame. Value of each property of the returned IShapeFrame instance is not undefined (is not NaN or NotDefined). Value of each property of the assigned IShapeFrame instance must be not undefined (must be not NaN or NotDefined). You can set undefined values for RawFrame instance properties.

Returns: ShapeFrame


getHeight

NameDescription
getHeight ()Returns or sets the height of the shape. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: float


getHidden

NameDescription
getHidden ()Determines whether the shape is hidden. Read/write boolean.

Returns: boolean


getHyperlinkClick

NameDescription
getHyperlinkClick ()Returns or sets the hyperlink defined for mouse click. Read/write IHyperlink.

Returns: Hyperlink


getHyperlinkManager

NameDescription
getHyperlinkManager ()Returns the hyperlink manager. Read-only IHyperlinkManager.

Returns: HyperlinkManager


getHyperlinkMouseOver

NameDescription
getHyperlinkMouseOver ()Returns or sets the hyperlink defined for mouse over. Read/write IHyperlink.

Returns: Hyperlink


getImage

NameDescription
getImage ()Returns shape thumbnail. ShapeThumbnailBounds.Shape shape thumbnail bounds type is used by default.

Returns: IImage


getImage

NameDescription
getImage (int, float, float)Returns shape thumbnail.

Parameters:

NameTypeDescription
boundsintShape thumbnail bounds type.
scaleXfloatX scale
scaleYfloatY scale

Returns: IImage


getLineFormat

NameDescription
getLineFormat ()Returns the LineFormat object that contains line formatting properties for a shape. Note: can return null for certain types of shapes which don’t have line properties. Read-only ILineFormat.

Returns: LineFormat


getName

NameDescription
getName ()Returns or sets the name of a shape. Must be not null. Use empty string value if needed. Read/write String.

Returns: String


getOfficeInteropShapeId

NameDescription
getOfficeInteropShapeId ()Gets unique shape identifier in slide scope. Read-only long. See also ( #getUniqueId) for getting unique shape identifier in presentation scope.

Returns: long


getParentGroup

NameDescription
getParentGroup ()Returns parent GroupShape object if shape is grouped. Otherwise returns null. Read-only IGroupShape. Property ( #isGrouped) determines whether the shape is grouped.

Returns: GroupShape


getPlaceholder

NameDescription
getPlaceholder ()Returns the placeholder for a shape. Returns null if the shape has no placeholder. Read-only IPlaceholder.

Returns: Placeholder


getPresentation

NameDescription
getPresentation ()Returns the parent presentation of a slide. Read-only IPresentation.

Returns: Presentation


getRawFrame

NameDescription
getRawFrame ()Returns or sets the raw shape frame’s properties. Read/write IShapeFrame.

Returns: ShapeFrame


getRotation

NameDescription
getRotation ()Returns or sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: float


getShapeLock

NameDescription
getShapeLock ()Returns shape’s locks. Read-only IBaseShapeLock.

Returns: GraphicalObjectLock, ConnectorLock, AutoShapeLock, PictureFrameLock, BaseShapeLock, GroupShapeLock


getSlide

NameDescription
getSlide ()Returns the parent slide of a shape. Read-only IBaseSlide.

Returns: MasterHandoutSlide, BaseSlide, LayoutSlide, Slide, MasterSlide, NotesSlide, MasterNotesSlide


getThreeDFormat

NameDescription
getThreeDFormat ()Returns the ThreeDFormat object that 3d effect properties for a shape. Note: can return null for certain types of shapes which don’t have 3d properties. Read-only IThreeDFormat.

Returns: ThreeDFormat


getThumbnail

NameDescription
getThumbnail ()Returns shape thumbnail. ShapeThumbnailBounds.Shape shape thumbnail bounds type is used by default.

Returns: BufferedImage


getThumbnail

NameDescription
getThumbnail (int, float, float)Returns shape thumbnail.

Parameters:

NameTypeDescription
boundsintShape thumbnail bounds type.
scaleXfloatX scale
scaleYfloatY scale

Returns: BufferedImage


getUniqueId

NameDescription
getUniqueId ()Gets unique shape identifier in presentation scope. Read-only long. See also ( #getOfficeInteropShapeId) for getting unique shape identifier in slide scope.

Returns: long


getWidth

NameDescription
getWidth ()Returns or sets the width of the shape. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: float


getX

NameDescription
getX ()Returns or sets the x-coordinate of the upper-left corner of the shape. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: float


getY

NameDescription
getY ()Returns or sets the y-coordinate of the upper-left corner of the shape. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: float


getZOrderPosition

NameDescription
getZOrderPosition ()Returns the position of a shape in the z-order. Shapes[0] returns the shape at the back of the z-order, and Shapes[Shapes.Count - 1] returns the shape at the front of the z-order. Read-only int.

Returns: int


isDecorative

NameDescription
isDecorative ()Gets or sets ‘Mark as decorative’ option Reed/write boolean.

Returns: boolean


isGrouped

NameDescription
isGrouped ()Determines whether the shape is grouped. Read-only boolean. Property ( #getParentGroup) returns parent GroupShape object if shape is grouped.

Returns: boolean


isTextHolder

NameDescription
isTextHolder ()Determines whether the shape is TextHolder_PPT. Read-only boolean.

Returns: boolean


removePlaceholder

NameDescription
removePlaceholder ()Defines that this shape isn’t a placeholder.

Returns: void


setAlternativeText

NameDescription
setAlternativeText (String)Returns or sets the alternative text associated with a shape. Read/write String.

Returns: void


setAlternativeTextTitle

NameDescription
setAlternativeTextTitle (String)Returns or sets the title of alternative text associated with a shape. Read/write String.

Returns: void


setBlackWhiteMode

NameDescription
setBlackWhiteMode (byte)Property specifies how a shape will render in black-and-white display mode.. Read/write BlackWhiteMode.

Returns: void


setDecorative

NameDescription
setDecorative (boolean)Gets or sets ‘Mark as decorative’ option Reed/write boolean.

Returns: void


setFrame

NameDescription
setFrame (ShapeFrame)Returns or sets the shape frame’s properties. Read/write IShapeFrame. Value of each property of the returned IShapeFrame instance is not undefined (is not NaN or NotDefined). Value of each property of the assigned IShapeFrame instance must be not undefined (must be not NaN or NotDefined). You can set undefined values for RawFrame instance properties.

Returns: void


setHeight

NameDescription
setHeight (float)Returns or sets the height of the shape. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: void


setHidden

NameDescription
setHidden (boolean)Determines whether the shape is hidden. Read/write boolean.

Returns: void


setHyperlinkClick

NameDescription
setHyperlinkClick (Hyperlink)Returns or sets the hyperlink defined for mouse click. Read/write IHyperlink.

Returns: void


setHyperlinkMouseOver

NameDescription
setHyperlinkMouseOver (Hyperlink)Returns or sets the hyperlink defined for mouse over. Read/write IHyperlink.

Returns: void


setName

NameDescription
setName (String)Returns or sets the name of a shape. Must be not null. Use empty string value if needed. Read/write String.

Returns: void


setRawFrame

NameDescription
setRawFrame (ShapeFrame)Returns or sets the raw shape frame’s properties. Read/write IShapeFrame.

Returns: void


setRotation

NameDescription
setRotation (float)Returns or sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: void


setWidth

NameDescription
setWidth (float)Returns or sets the width of the shape. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: void


setX

NameDescription
setX (float)Returns or sets the x-coordinate of the upper-left corner of the shape. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: void


setY

NameDescription
setY (float)Returns or sets the y-coordinate of the upper-left corner of the shape. Read/write float. Returned value is always defined (is not Float.NaN). Assigned value must be defined (not Float.NaN). You can set undefined values for RawFrame instance properties.

Returns: void


writeAsSvg

NameDescription
writeAsSvg (OutputStream)Saves content of Shape as SVG file.

Parameters:

NameTypeDescription
streamOutputStreamTarget stream

Returns: void


writeAsSvg

NameDescription
writeAsSvg (OutputStream, SVGOptions)Saves content of Shape as SVG file.

Parameters:

NameTypeDescription
streamOutputStreamTarget stream
svgOptionsSVGOptionsSVG generation options

Returns: void