Shape
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.slides.IShape, com.aspose.slides.IDOMObject
public class Shape implements IShape, IDOMObject
Represents a shape on a slide.
Methods
Method | Description |
---|---|
isTextHolder() | Determines whether the shape is TextHolder_PPT. |
getPlaceholder() | Returns the placeholder for a shape. |
removePlaceholder() | Defines that this shape isn’t a placeholder. |
addPlaceholder(IPlaceholder placeholderToCopyFrom) | Adds a new placeholder if there is no and sets placeholder properties to a specified one. |
getBasePlaceholder() | Returns a basic placeholder shape (shape from the layout and/or master slide that the current shape is inherited from). |
getCustomData() | Returns the shape’s custom data. |
getRawFrame() | Returns or sets the raw shape frame’s properties. |
setRawFrame(IShapeFrame value) | Returns or sets the raw shape frame’s properties. |
getFrame() | Returns or sets the shape frame’s properties. |
setFrame(IShapeFrame value) | Returns or sets the shape frame’s properties. |
getLineFormat() | Returns the LineFormat object that contains line formatting properties for a shape. |
getThreeDFormat() | Returns the ThreeDFormat object that 3d effect properties for a shape. |
getEffectFormat() | Returns the EffectFormat object which contains pixel effects applied to a shape. |
getFillFormat() | Returns the FillFormat object that contains fill formatting properties for a shape. |
getThumbnail() | Returns shape thumbnail. |
getImage() | Returns shape thumbnail. |
getThumbnail(int bounds, float scaleX, float scaleY) | Returns shape thumbnail. |
getImage(int bounds, float scaleX, float scaleY) | Returns shape thumbnail. |
writeAsSvg(OutputStream stream) | Saves content of Shape as SVG file. |
writeAsSvg(OutputStream stream, ISVGOptions svgOptions) | Saves content of Shape as SVG file. |
getHyperlinkClick() | Returns or sets the hyperlink defined for mouse click. |
setHyperlinkClick(IHyperlink value) | Returns or sets the hyperlink defined for mouse click. |
getHyperlinkMouseOver() | Returns or sets the hyperlink defined for mouse over. |
setHyperlinkMouseOver(IHyperlink value) | Returns or sets the hyperlink defined for mouse over. |
getHyperlinkManager() | Returns the hyperlink manager. |
getHidden() | Determines whether the shape is hidden. |
setHidden(boolean value) | Determines whether the shape is hidden. |
getZOrderPosition() | Returns the position of a shape in the z-order. |
getConnectionSiteCount() | Returns the number of connection sites on the shape. |
getRotation() | Returns or sets the number of degrees the specified shape is rotated around the z-axis. |
setRotation(float value) | Returns or sets the number of degrees the specified shape is rotated around the z-axis. |
getX() | Returns or sets the x-coordinate of the upper-left corner of the shape. |
setX(float value) | Returns or sets the x-coordinate of the upper-left corner of the shape. |
getY() | Returns or sets the y-coordinate of the upper-left corner of the shape. |
setY(float value) | Returns or sets the y-coordinate of the upper-left corner of the shape. |
getWidth() | Returns or sets the width of the shape. |
setWidth(float value) | Returns or sets the width of the shape. |
getHeight() | Returns or sets the height of the shape. |
setHeight(float value) | Returns or sets the height of the shape. |
getBlackWhiteMode() | Property specifies how a shape will render in black-and-white display mode.. |
setBlackWhiteMode(byte value) | Property specifies how a shape will render in black-and-white display mode.. |
getUniqueId() | Gets unique shape identifier in presentation scope. |
getOfficeInteropShapeId() | Gets unique shape identifier in slide scope. |
getAlternativeText() | Returns or sets the alternative text associated with a shape. |
setAlternativeText(String value) | Returns or sets the alternative text associated with a shape. |
getAlternativeTextTitle() | Returns or sets the title of alternative text associated with a shape. |
setAlternativeTextTitle(String value) | Returns or sets the title of alternative text associated with a shape. |
getName() | Returns or sets the name of a shape. |
setName(String value) | Returns or sets the name of a shape. |
isDecorative() | Gets or sets ‘Mark as decorative’ option Reed/write boolean. |
setDecorative(boolean value) | Gets or sets ‘Mark as decorative’ option Reed/write boolean. |
getShapeLock() | Returns shape’s locks. |
isGrouped() | Determines whether the shape is grouped. |
getParentGroup() | Returns parent GroupShape object if shape is grouped. |
getParent_Immediate() | |
getSlide() | Returns the parent slide of a shape. |
getPresentation() | Returns the parent presentation of a slide. |
isTextHolder()
public final boolean isTextHolder()
Determines whether the shape is TextHolder_PPT. Read-only boolean .
Returns: boolean
getPlaceholder()
public final IPlaceholder getPlaceholder()
Returns the placeholder for a shape. Returns null if the shape has no placeholder. Read-only IPlaceholder.
The following example shows how to change Text in Placeholder. // Instantiates a Presentation class Presentation pres = new Presentation("ReplacingText.pptx"); try { // Accesses the first slide ISlide sld = pres.getSlides().get_Item(0); // Iterates through shapes to find the placeholder for (IShape shp : sld.getShapes()) if (shp.getPlaceholder() != null) { // Changes the text in each placeholder ((IAutoShape)shp).getTextFrame().setText("This is a Placeholder"); } // Saves the presentation to disk pres.save("output_out.pptx", SaveFormat.Pptx); } finally { if (pres != null) pres.dispose(); } The following example shows how to set Prompt Text in Placeholder. Presentation pres = new Presentation("Presentation2.pptx"); try { ISlide slide = pres.getSlides().get_Item(0); for (IShape shape : slide.getSlide().getShapes()) // Iterates through the slide { if (shape.getPlaceholder() != null && shape instanceof AutoShape) { String text = ""; if (shape.getPlaceholder().getType() == PlaceholderType.CenteredTitle) // PowerPoint displays "Click to add title" { text = "Add Title"; } else if (shape.getPlaceholder().getType() == PlaceholderType.Subtitle) // Adds subtitle { text = "Add Subtitle"; } ((IAutoShape)shape).getTextFrame().setText(text); System.out.println("Placeholder with text: " + text); } } pres.save("Placeholders_PromptText.pptx", SaveFormat.Pptx); } finally { if (pres != null) pres.dispose(); }
Returns: IPlaceholder
removePlaceholder()
public final void removePlaceholder()
Defines that this shape isn’t a placeholder.
addPlaceholder(IPlaceholder placeholderToCopyFrom)
public final IPlaceholder addPlaceholder(IPlaceholder placeholderToCopyFrom)
Adds a new placeholder if there is no and sets placeholder properties to a specified one.
Parameters:
Parameter | Type | Description |
---|---|---|
placeholderToCopyFrom | IPlaceholder | Placeholder to copy content from. |
Returns: IPlaceholder - New #getPlaceholder.getPlaceholder.
getBasePlaceholder()
public final IShape getBasePlaceholder()
Returns a basic placeholder shape (shape from the layout and/or master slide that the current shape is inherited from).
// get all (master/layout/slide) animated effects of the placeholder shape Presentation pres = new Presentation("sample.pptx"); try { ISlide slide = pres.getSlides().get_Item(0); IShape shape = slide.getShapes().get_Item(0); IEffect[] shapeEffects = slide.getLayoutSlide().getTimeline().getMainSequence().getEffectsByShape(shape); IShape layoutShape = shape.getBasePlaceholder(); IEffect[] layoutShapeEffects = slide.getLayoutSlide().getTimeline().getMainSequence().getEffectsByShape(layoutShape); IShape masterShape = layoutShape.getBasePlaceholder(); IEffect[] masterShapeEffects = slide.getLayoutSlide().getMasterSlide().getTimeline().getMainSequence().getEffectsByShape(masterShape); } finally { if (pres != null) pres.dispose(); }
A null is returned if the current shape is not inherited.
Returns: IShape
getCustomData()
public final ICustomData getCustomData()
Returns the shape’s custom data. Read-only ICustomData.
Returns: ICustomData
getRawFrame()
public final IShapeFrame getRawFrame()
Returns or sets the raw shape frame’s properties. Read/write IShapeFrame.
Code that attempts to assign undefined frame to IShape.getFrame() doesn't make sense in general case (particularly in case when parent GroupShape is multiple nested into other GroupShape-s). For example: IShape shape = ...; shape.setFrame(new ShapeFrame(Float.NaN, Float.NaN, Float.NaN, Float.NaN, NullableBool.NotDefined, NullableBool.NotDefined, Float.NaN)); //or slide.getShapes().addAutoShape(ShapeType.RoundCornerRectangle, Float.NaN, Float.NaN, Float.NaN, Float.NaN); //Such code can lead to unclear situations. So restrictions had been added for using undefined values for IShape.getFrame(). Values of x, y, width, height, flipH, flipV and rotationAngle must be defined (not Float.NaN or NullableBool.NotDefined). Example code above now throws ArgumentException exception. //This applies to these use cases: IShape shape = ...; shape.setFrame(...); // cannot be undefined IShapeCollection shapes = ...; // x, y, width, height parameters cannot be Float.NaN: { shapes.addAudioFrameCD(...); shapes.addAudioFrameEmbedded(...); shapes.addAudioFrameLinked(...); shapes.addAutoShape(...); shapes.addChart(...); shapes.addConnector(...); shapes.addOleObjectFrame(...); shapes.addPictureFrame(...); shapes.addSmartArt(...); shapes.addTable(...); shapes.addVideoFrame(...); shapes.insertAudioFrameEmbedded(...); shapes.insertAudioFrameLinked(...); shapes.insertAutoShape(...); shapes.insertChart(...); shapes.insertConnector(...); shapes.insertOleObjectFrame(...); shapes.insertPictureFrame(...); shapes.insertTable(...); shapes.insertVideoFrame(...); } //But IShape.RawFrame frame properties can be undefined. This make sence when shape is linked to placeholder. Then undefined shape frame values is overridden from the parent placeholder shape. If there is no parent placeholder shape for that shape then that shape uses default values when it evaluates effective frame based on its IShape.RawFrame. Default values are 0 and NullableBool.False for x, y, width, height, flipH, flipV and rotationAngle. For example: IShape shape = ...; // shape is linked to placeholder shape.setRawFrame(new ShapeFrame(Float.NaN, Float.NaN, 100, Float.NaN, NullableBool.NotDefined, NullableBool.NotDefined, 0)); // now shape inherits x, y, height, flipH, flipV values form placeholder and overrides width=100 and rotationAngle=0.{code}
Returns: IShapeFrame
setRawFrame(IShapeFrame value)
public final void setRawFrame(IShapeFrame value)
Returns or sets the raw shape frame’s properties. Read/write IShapeFrame.
Code that attempts to assign undefined frame to IShape.getFrame() doesn't make sense in general case (particularly in case when parent GroupShape is multiple nested into other GroupShape-s). For example: IShape shape = ...; shape.setFrame(new ShapeFrame(Float.NaN, Float.NaN, Float.NaN, Float.NaN, NullableBool.NotDefined, NullableBool.NotDefined, Float.NaN)); //or slide.getShapes().addAutoShape(ShapeType.RoundCornerRectangle, Float.NaN, Float.NaN, Float.NaN, Float.NaN); //Such code can lead to unclear situations. So restrictions had been added for using undefined values for IShape.getFrame(). Values of x, y, width, height, flipH, flipV and rotationAngle must be defined (not Float.NaN or NullableBool.NotDefined). Example code above now throws ArgumentException exception. //This applies to these use cases: IShape shape = ...; shape.setFrame(...); // cannot be undefined IShapeCollection shapes = ...; // x, y, width, height parameters cannot be Float.NaN: { shapes.addAudioFrameCD(...); shapes.addAudioFrameEmbedded(...); shapes.addAudioFrameLinked(...); shapes.addAutoShape(...); shapes.addChart(...); shapes.addConnector(...); shapes.addOleObjectFrame(...); shapes.addPictureFrame(...); shapes.addSmartArt(...); shapes.addTable(...); shapes.addVideoFrame(...); shapes.insertAudioFrameEmbedded(...); shapes.insertAudioFrameLinked(...); shapes.insertAutoShape(...); shapes.insertChart(...); shapes.insertConnector(...); shapes.insertOleObjectFrame(...); shapes.insertPictureFrame(...); shapes.insertTable(...); shapes.insertVideoFrame(...); } //But IShape.RawFrame frame properties can be undefined. This make sence when shape is linked to placeholder. Then undefined shape frame values is overridden from the parent placeholder shape. If there is no parent placeholder shape for that shape then that shape uses default values when it evaluates effective frame based on its IShape.RawFrame. Default values are 0 and NullableBool.False for x, y, width, height, flipH, flipV and rotationAngle. For example: IShape shape = ...; // shape is linked to placeholder shape.setRawFrame(new ShapeFrame(Float.NaN, Float.NaN, 100, Float.NaN, NullableBool.NotDefined, NullableBool.NotDefined, 0)); // now shape inherits x, y, height, flipH, flipV values form placeholder and overrides width=100 and rotationAngle=0.{code}
Parameters:
Parameter | Type | Description |
---|---|---|
value | IShapeFrame |
getFrame()
public final IShapeFrame 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: IShapeFrame
setFrame(IShapeFrame value)
public final void setFrame(IShapeFrame value)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
value | IShapeFrame |
getLineFormat()
public ILineFormat 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: ILineFormat
getThreeDFormat()
public IThreeDFormat 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: IThreeDFormat
getEffectFormat()
public IEffectFormat 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: IEffectFormat
getFillFormat()
public IFillFormat 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.
The following example shows how to change the accent color for a theme of PowerPoint Presentation. Presentation pres = new Presentation(); try { IAutoShape shape = pres.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 10, 10, 100, 100); shape.getFillFormat().setFillType(FillType.Solid); shape.getFillFormat().getSolidFillColor().setSchemeColor(SchemeColor.Accent4); } finally { if (pres != null) pres.dispose(); } The following example demonstrates how to obtain palette colors from the main theme color and then used in shapes. Presentation pres = new Presentation(); try { ISlide slide = pres.getSlides().get_Item(0); // Accent 4 IShape shape1 = slide.getShapes().addAutoShape(ShapeType.Rectangle, 10, 10, 50, 50); shape1.getFillFormat().setFillType(FillType.Solid); shape1.getFillFormat().getSolidFillColor().setSchemeColor(SchemeColor.Accent4); // Accent 4, Lighter 80% IShape shape2 = slide.getShapes().addAutoShape(ShapeType.Rectangle, 10, 70, 50, 50); shape2.getFillFormat().setFillType(FillType.Solid); shape2.getFillFormat().getSolidFillColor().setSchemeColor(SchemeColor.Accent4); shape2.getFillFormat().getSolidFillColor().getColorTransform().add(ColorTransformOperation.MultiplyLuminance, 0.2f); shape2.getFillFormat().getSolidFillColor().getColorTransform().add(ColorTransformOperation.AddLuminance, 0.8f); // Accent 4, Lighter 60% IShape shape3 = slide.getShapes().addAutoShape(ShapeType.Rectangle, 10, 130, 50, 50); shape3.getFillFormat().setFillType(FillType.Solid); shape3.getFillFormat().getSolidFillColor().setSchemeColor(SchemeColor.Accent4); shape3.getFillFormat().getSolidFillColor().getColorTransform().add(ColorTransformOperation.MultiplyLuminance, 0.4f); shape3.getFillFormat().getSolidFillColor().getColorTransform().add(ColorTransformOperation.AddLuminance, 0.6f); // Accent 4, Lighter 40% IShape shape4 = slide.getShapes().addAutoShape(ShapeType.Rectangle, 10, 190, 50, 50); shape4.getFillFormat().setFillType(FillType.Solid); shape4.getFillFormat().getSolidFillColor().setSchemeColor(SchemeColor.Accent4); shape4.getFillFormat().getSolidFillColor().getColorTransform().add(ColorTransformOperation.MultiplyLuminance, 0.6f); shape4.getFillFormat().getSolidFillColor().getColorTransform().add(ColorTransformOperation.AddLuminance, 0.4f); // Accent 4, Darker 25% IShape shape5 = slide.getShapes().addAutoShape(ShapeType.Rectangle, 10, 250, 50, 50); shape5.getFillFormat().setFillType(FillType.Solid); shape5.getFillFormat().getSolidFillColor().setSchemeColor(SchemeColor.Accent4); shape5.getFillFormat().getSolidFillColor().getColorTransform().add(ColorTransformOperation.MultiplyLuminance, 0.75f); // Accent 4, Darker 50% IShape shape6 = slide.getShapes().addAutoShape(ShapeType.Rectangle, 10, 310, 50, 50); shape6.getFillFormat().setFillType(FillType.Solid); shape6.getFillFormat().getSolidFillColor().setSchemeColor(SchemeColor.Accent4); shape6.getFillFormat().getSolidFillColor().getColorTransform().add(ColorTransformOperation.MultiplyLuminance, 0.5f); pres.save("example_accent4.pptx", SaveFormat.Pptx); } finally { if (pres != null) pres.dispose(); }
Returns: IFillFormat
getThumbnail()
public final BufferedImage getThumbnail()
Returns shape thumbnail. ShapeThumbnailBounds.Shape shape thumbnail bounds type is used by default.
Returns: java.awt.image.BufferedImage - Shape thumbnail.
getImage()
public final IImage getImage()
Returns shape thumbnail. ShapeThumbnailBounds.Shape shape thumbnail bounds type is used by default.
Returns: IImage - Shape thumbnail.
getThumbnail(int bounds, float scaleX, float scaleY)
public final BufferedImage getThumbnail(int bounds, float scaleX, float scaleY)
Returns shape thumbnail.
Parameters:
Parameter | Type | Description |
---|---|---|
bounds | int | Shape thumbnail bounds type. |
scaleX | float | X scale |
scaleY | float | Y scale |
Returns: java.awt.image.BufferedImage - Shape thumbnail or null in case when ShapeThumbnailBounds.Appearance is used and a shape doesn’t have visible elements.
getImage(int bounds, float scaleX, float scaleY)
public final IImage getImage(int bounds, float scaleX, float scaleY)
Returns shape thumbnail.
Parameters:
Parameter | Type | Description |
---|---|---|
bounds | int | Shape thumbnail bounds type. |
scaleX | float | X scale |
scaleY | float | Y scale |
Returns: IImage - Shape thumbnail or null in case when ShapeThumbnailBounds.Appearance is used and a shape doesn’t have visible elements.
writeAsSvg(OutputStream stream)
public final void writeAsSvg(OutputStream stream)
Saves content of Shape as SVG file.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | Target stream |
writeAsSvg(OutputStream stream, ISVGOptions svgOptions)
public final void writeAsSvg(OutputStream stream, ISVGOptions svgOptions)
Saves content of Shape as SVG file.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | Target stream |
svgOptions | ISVGOptions | SVG generation options |
getHyperlinkClick()
public final IHyperlink getHyperlinkClick()
Returns or sets the hyperlink defined for mouse click. Read/write IHyperlink.
Returns: IHyperlink
setHyperlinkClick(IHyperlink value)
public final void setHyperlinkClick(IHyperlink value)
Returns or sets the hyperlink defined for mouse click. Read/write IHyperlink.
Parameters:
Parameter | Type | Description |
---|---|---|
value | IHyperlink |
getHyperlinkMouseOver()
public final IHyperlink getHyperlinkMouseOver()
Returns or sets the hyperlink defined for mouse over. Read/write IHyperlink.
Returns: IHyperlink
setHyperlinkMouseOver(IHyperlink value)
public final void setHyperlinkMouseOver(IHyperlink value)
Returns or sets the hyperlink defined for mouse over. Read/write IHyperlink.
Parameters:
Parameter | Type | Description |
---|---|---|
value | IHyperlink |
getHyperlinkManager()
public final IHyperlinkManager getHyperlinkManager()
Returns the hyperlink manager. Read-only IHyperlinkManager.
Returns: IHyperlinkManager
getHidden()
public final boolean getHidden()
Determines whether the shape is hidden. Read/write boolean .
Returns: boolean
setHidden(boolean value)
public final void setHidden(boolean value)
Determines whether the shape is hidden. Read/write boolean .
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
getZOrderPosition()
public int 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
getConnectionSiteCount()
public final int getConnectionSiteCount()
Returns the number of connection sites on the shape. Read-only int .
Returns: int
getRotation()
public final float 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
setRotation(float value)
public final void setRotation(float value)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
value | float |
getX()
public final float 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
setX(float value)
public final void setX(float value)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
value | float |
getY()
public final float 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
setY(float value)
public final void setY(float value)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
value | float |
getWidth()
public final float 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
setWidth(float value)
public final void setWidth(float value)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
value | float |
getHeight()
public final float 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
setHeight(float value)
public final void setHeight(float value)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
value | float |
getBlackWhiteMode()
public final byte getBlackWhiteMode()
Property specifies how a shape will render in black-and-white display mode.. Read/write BlackWhiteMode.
Returns: byte
setBlackWhiteMode(byte value)
public final void setBlackWhiteMode(byte value)
Property specifies how a shape will render in black-and-white display mode.. Read/write BlackWhiteMode.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte |
getUniqueId()
public final long getUniqueId()
Gets unique shape identifier in presentation scope. Read-only long. See also #getOfficeInteropShapeId.getOfficeInteropShapeId for getting unique shape identifier in slide scope.
Returns: long
getOfficeInteropShapeId()
public final long getOfficeInteropShapeId()
Gets unique shape identifier in slide scope. Read-only long. See also #getUniqueId.getUniqueId for getting unique shape identifier in presentation scope.
Returns: long
getAlternativeText()
public final String getAlternativeText()
Returns or sets the alternative text associated with a shape. Read/write String.
Returns: java.lang.String
setAlternativeText(String value)
public final void setAlternativeText(String value)
Returns or sets the alternative text associated with a shape. Read/write String.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
getAlternativeTextTitle()
public final String getAlternativeTextTitle()
Returns or sets the title of alternative text associated with a shape. Read/write String.
Returns: java.lang.String
setAlternativeTextTitle(String value)
public final void setAlternativeTextTitle(String value)
Returns or sets the title of alternative text associated with a shape. Read/write String.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
getName()
public final String getName()
Returns or sets the name of a shape. Must be not null. Use empty string value if needed. Read/write String.
Returns: java.lang.String
setName(String value)
public final void setName(String value)
Returns or sets the name of a shape. Must be not null. Use empty string value if needed. Read/write String.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
isDecorative()
public final boolean isDecorative()
Gets or sets ‘Mark as decorative’ option Reed/write boolean.
Presentation pres = new Presentation("sample.pptx"); try { pres.getSlides().get_Item(0).getShapes().get_Item(0).setDecorative(true); } finally { if (pres != null) pres.dispose(); }
Returns: boolean
setDecorative(boolean value)
public final void setDecorative(boolean value)
Gets or sets ‘Mark as decorative’ option Reed/write boolean.
Presentation pres = new Presentation("sample.pptx"); try { pres.getSlides().get_Item(0).getShapes().get_Item(0).setDecorative(true); } finally { if (pres != null) pres.dispose(); }
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
getShapeLock()
public IBaseShapeLock getShapeLock()
Returns shape’s locks. Read-only IBaseShapeLock.
Returns: IBaseShapeLock
isGrouped()
public final boolean isGrouped()
Determines whether the shape is grouped. Read-only boolean.
Property #getParentGroup.getParentGroup returns parent GroupShape object if shape is grouped.
Returns: boolean
getParentGroup()
public final IGroupShape getParentGroup()
Returns parent GroupShape object if shape is grouped. Otherwise returns null. Read-only IGroupShape.
Property #isGrouped.isGrouped determines whether the shape is grouped.
Returns: IGroupShape
getParent_Immediate()
public final IDOMObject getParent_Immediate()
Returns Parent_Immediate object. Read-only IDOMObject.
Returns: com.aspose.slides.IDOMObject
getSlide()
public final IBaseSlide getSlide()
Returns the parent slide of a shape. Read-only IBaseSlide.
Returns: IBaseSlide
getPresentation()
public final IPresentation getPresentation()
Returns the parent presentation of a slide. Read-only IPresentation.
Returns: IPresentation