public class Shape extends java.lang.Object implements IShape
Represents a shape on a slide.
Modifier and Type | Method and Description |
---|---|
IPlaceholder |
addPlaceholder(IPlaceholder placeholderToCopyFrom)
Adds a new placeholder if there is no and sets placeholder properties to a specified one.
|
IEffectFormatEffectiveData |
createEffectFormatEffective()
Deprecated.
Use EffectFormat.GetEffective() instead. The method will be removed after release of version 20.8.
|
IFillFormatEffectiveData |
createFillFormatEffective()
Deprecated.
Use FillFormat.GetEffective() instead. The method will be removed after release of version 20.8.
|
ILineFormatEffectiveData |
createLineFormatEffective()
Deprecated.
Use LineFormat.GetEffective() instead. The method will be removed after release of version 20.8.
|
IThreeDFormatEffectiveData |
createThreeDFormatEffective()
Deprecated.
Use ThreeDFormatFormat.GetEffective() instead. The method will be removed after release of version 20.8.
|
java.lang.String |
getAlternativeText()
Returns or sets the alternative text associated with a shape.
|
java.lang.String |
getAlternativeTextTitle()
Returns or sets the title of alternative text associated with a shape.
|
byte |
getBlackWhiteMode()
Property specifies how a shape will render in black-and-white display mode..
|
int |
getConnectionSiteCount()
Returns the number of connection sites on the shape.
|
ICustomData |
getCustomData()
Returns the shape's custom data.
|
IEffectFormat |
getEffectFormat()
Returns the EffectFormat object which contains pixel effects applied to a shape.
|
IFillFormat |
getFillFormat()
Returns the FillFormat object that contains fill formatting properties for a shape.
|
IShapeFrame |
getFrame()
Returns or sets the shape frame's properties.
|
float |
getHeight()
Returns or sets the height of the shape.
|
boolean |
getHidden()
Determines whether the shape is hidden.
|
IHyperlink |
getHyperlinkClick()
Returns or sets the hyperlink defined for mouse click.
|
IHyperlinkManager |
getHyperlinkManager()
Returns the hyperlink manager.
|
IHyperlink |
getHyperlinkMouseOver()
Returns or sets the hyperlink defined for mouse over.
|
ILineFormat |
getLineFormat()
Returns the LineFormat object that contains line formatting properties for a shape.
|
java.lang.String |
getName()
Returns or sets the name of a shape.
|
long |
getOfficeInteropShapeId()
Gets unique shape identifier in slide scope.
|
com.aspose.slides.IDOMObject |
getParent_Immediate()
Returns Parent_Immediate object.
|
IGroupShape |
getParentGroup()
Returns parent GroupShape object if shape is grouped.
|
IPlaceholder |
getPlaceholder()
Returns the placeholder for a shape.
|
IPresentation |
getPresentation()
Returns the parent presentation of a slide.
|
IShapeFrame |
getRawFrame()
Returns or sets the raw shape frame's properties.
|
float |
getRotation()
Returns or sets the number of degrees the specified shape is rotated around
the z-axis.
|
IBaseShapeLock |
getShapeLock()
Returns shape's locks.
|
IBaseSlide |
getSlide()
Returns the parent slide of a shape.
|
IThreeDFormat |
getThreeDFormat()
Returns the ThreeDFormat object that 3d effect properties for a shape.
|
java.awt.image.BufferedImage |
getThumbnail()
Returns shape thumbnail.
|
java.awt.image.BufferedImage |
getThumbnail(int bounds,
float scaleX,
float scaleY)
Returns shape thumbnail.
|
long |
getUniqueId()
Gets unique shape identifier in presentation scope.
|
float |
getWidth()
Returns or sets the width of the shape.
|
float |
getX()
Returns or sets the x-coordinate of the upper-left corner of the shape.
|
float |
getY()
Returns or sets the y-coordinate of the upper-left corner of the shape.
|
int |
getZOrderPosition()
Returns the position of a shape in the z-order.
|
boolean |
isGrouped()
Determines whether the shape is grouped.
|
boolean |
isTextHolder()
Determines whether the shape is TextHolder_PPT.
|
void |
removePlaceholder()
Defines that this shape isn't a placeholder.
|
void |
setAlternativeText(java.lang.String value)
Returns or sets the alternative text associated with a shape.
|
void |
setAlternativeTextTitle(java.lang.String value)
Returns or sets the title of alternative text associated with a shape.
|
void |
setBlackWhiteMode(byte value)
Property specifies how a shape will render in black-and-white display mode..
|
void |
setFrame(IShapeFrame value)
Returns or sets the shape frame's properties.
|
void |
setHeight(float value)
Returns or sets the height of the shape.
|
void |
setHidden(boolean value)
Determines whether the shape is hidden.
|
void |
setHyperlinkClick(IHyperlink value)
Returns or sets the hyperlink defined for mouse click.
|
void |
setHyperlinkMouseOver(IHyperlink value)
Returns or sets the hyperlink defined for mouse over.
|
void |
setName(java.lang.String value)
Returns or sets the name of a shape.
|
void |
setRawFrame(IShapeFrame value)
Returns or sets the raw shape frame's properties.
|
void |
setRotation(float value)
Returns or sets the number of degrees the specified shape is rotated around
the z-axis.
|
void |
setWidth(float value)
Returns or sets the width of the shape.
|
void |
setX(float value)
Returns or sets the x-coordinate of the upper-left corner of the shape.
|
void |
setY(float value)
Returns or sets the y-coordinate of the upper-left corner of the shape.
|
void |
writeAsSvg(java.io.OutputStream stream)
Saves content of Shape as SVG file.
|
void |
writeAsSvg(java.io.OutputStream stream,
ISVGOptions svgOptions)
Saves content of Shape as SVG file.
|
public final boolean isTextHolder()
Determines whether the shape is TextHolder_PPT.
Read-only boolean
.
isTextHolder
in interface IShape
public final IPlaceholder getPlaceholder()
Returns the placeholder for a shape. Returns null if the shape has no placeholder.
Read-only IPlaceholder
.
getPlaceholder
in interface IShape
public final void removePlaceholder()
Defines that this shape isn't a placeholder.
removePlaceholder
in interface IShape
public final IPlaceholder addPlaceholder(IPlaceholder placeholderToCopyFrom)
Adds a new placeholder if there is no and sets placeholder properties to a specified one.
addPlaceholder
in interface IShape
placeholderToCopyFrom
- Placeholder to copy content from.Placeholder
(getPlaceholder()
).public final ICustomData getCustomData()
Returns the shape's custom data.
Read-only ICustomData
.
getCustomData
in interface IShape
public final IShapeFrame getRawFrame()
Returns or sets the raw shape frame's properties.
Read/write IShapeFrame
.
getRawFrame
in interface IShape
public final void setRawFrame(IShapeFrame value)
Returns or sets the raw shape frame's properties.
Read/write IShapeFrame
.
setRawFrame
in interface IShape
public final IShapeFrame getFrame()
Returns or sets the shape frame's properties.
Read/write IShapeFrame
.
public final void setFrame(IShapeFrame value)
Returns or sets the shape frame's properties.
Read/write IShapeFrame
.
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
.
getLineFormat
in interface IShape
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
.
getThreeDFormat
in interface IShape
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
.
getEffectFormat
in interface IShape
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
.
getFillFormat
in interface IShape
@Deprecated public final ILineFormatEffectiveData createLineFormatEffective()
Creates the LineFormatEffectiveData object that contains all line formatting properties for a shape, included inherited.
createLineFormatEffective
in interface IShape
LineFormatEffectiveData
.@Deprecated public final IFillFormatEffectiveData createFillFormatEffective()
Creates the FillFormatEffectiveData object that contains all fill formatting properties for a shape, included inherited.
createFillFormatEffective
in interface IShape
FillFormatEffectiveData
.@Deprecated public final IEffectFormatEffectiveData createEffectFormatEffective()
Creates the EffectFormatEffectiveData object that contains all effects applyed to a shape, included inherited.
createEffectFormatEffective
in interface IShape
EffectFormatEffectiveData
.@Deprecated public final IThreeDFormatEffectiveData createThreeDFormatEffective()
Creates the ThreeDFormatEffectiveData object that contains volume properties and 3D transformation of a shape, included inherited.
createThreeDFormatEffective
in interface IShape
ThreeDFormatEffectiveData
.public final java.awt.image.BufferedImage getThumbnail()
Returns shape thumbnail. ShapeThumbnailBounds.Shape shape thumbnail bounds type is used by default.
getThumbnail
in interface IShape
public final java.awt.image.BufferedImage getThumbnail(int bounds, float scaleX, float scaleY)
Returns shape thumbnail.
getThumbnail
in interface IShape
bounds
- Shape thumbnail bounds type.scaleX
- X scalescaleY
- Y scalepublic final void writeAsSvg(java.io.OutputStream stream)
Saves content of Shape as SVG file.
writeAsSvg
in interface IShape
stream
- Target streampublic final void writeAsSvg(java.io.OutputStream stream, ISVGOptions svgOptions)
Saves content of Shape as SVG file.
writeAsSvg
in interface IShape
stream
- Target streamsvgOptions
- SVG generation optionspublic final IHyperlink getHyperlinkClick()
Returns or sets the hyperlink defined for mouse click.
Read/write IHyperlink
.
getHyperlinkClick
in interface IHyperlinkContainer
public final void setHyperlinkClick(IHyperlink value)
Returns or sets the hyperlink defined for mouse click.
Read/write IHyperlink
.
setHyperlinkClick
in interface IHyperlinkContainer
public final IHyperlink getHyperlinkMouseOver()
Returns or sets the hyperlink defined for mouse over.
Read/write IHyperlink
.
getHyperlinkMouseOver
in interface IHyperlinkContainer
public final void setHyperlinkMouseOver(IHyperlink value)
Returns or sets the hyperlink defined for mouse over.
Read/write IHyperlink
.
setHyperlinkMouseOver
in interface IHyperlinkContainer
public final IHyperlinkManager getHyperlinkManager()
Returns the hyperlink manager.
Read-only IHyperlinkManager
.
getHyperlinkManager
in interface IHyperlinkContainer
public final boolean getHidden()
Determines whether the shape is hidden.
Read/write boolean
.
public final void setHidden(boolean value)
Determines whether the shape is hidden.
Read/write boolean
.
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
.
getZOrderPosition
in interface IShape
public final int getConnectionSiteCount()
Returns the number of connection sites on the shape.
Read-only int
.
getConnectionSiteCount
in interface IShape
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
.
getRotation
in interface IShape
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
.
setRotation
in interface IShape
public final float getX()
Returns or sets the x-coordinate of the upper-left corner of the shape.
Read/write float
.
public final void setX(float value)
Returns or sets the x-coordinate of the upper-left corner of the shape.
Read/write float
.
public final float getY()
Returns or sets the y-coordinate of the upper-left corner of the shape.
Read/write float
.
public final void setY(float value)
Returns or sets the y-coordinate of the upper-left corner of the shape.
Read/write float
.
public final float getWidth()
Returns or sets the width of the shape.
Read/write float
.
public final void setWidth(float value)
Returns or sets the width of the shape.
Read/write float
.
public final float getHeight()
Returns or sets the height of the shape.
Read/write float
.
public final void setHeight(float value)
Returns or sets the height of the shape.
Read/write float
.
public final byte getBlackWhiteMode()
Property specifies how a shape will render in black-and-white display mode..
Read/write BlackWhiteMode
.
getBlackWhiteMode
in interface IShape
public final void setBlackWhiteMode(byte value)
Property specifies how a shape will render in black-and-white display mode..
Read/write BlackWhiteMode
.
setBlackWhiteMode
in interface IShape
public final long getUniqueId()
Gets unique shape identifier in presentation scope.
Read-only long
.
See also OfficeInteropShapeId
(getOfficeInteropShapeId()
) for getting unique shape identifier in slide scope.
getUniqueId
in interface IShape
public final long getOfficeInteropShapeId()
Gets unique shape identifier in slide scope.
Read-only long
.
See also UniqueId
(getUniqueId()
) for getting unique shape identifier in presentation scope.
getOfficeInteropShapeId
in interface IShape
public java.lang.String getAlternativeText()
Returns or sets the alternative text associated with a shape.
Read/write String
.
getAlternativeText
in interface IShape
public void setAlternativeText(java.lang.String value)
Returns or sets the alternative text associated with a shape.
Read/write String
.
setAlternativeText
in interface IShape
public java.lang.String getAlternativeTextTitle()
Returns or sets the title of alternative text associated with a shape.
Read/write String
.
getAlternativeTextTitle
in interface IShape
public void setAlternativeTextTitle(java.lang.String value)
Returns or sets the title of alternative text associated with a shape.
Read/write String
.
setAlternativeTextTitle
in interface IShape
public java.lang.String getName()
Returns or sets the name of a shape.
Must be not null. Use empty string value if needed.
Read/write String
.
public void setName(java.lang.String value)
Returns or sets the name of a shape.
Must be not null. Use empty string value if needed.
Read/write String
.
public IBaseShapeLock getShapeLock()
Returns shape's locks.
Read-only IBaseShapeLock
.
getShapeLock
in interface IShape
public final boolean isGrouped()
Determines whether the shape is grouped.
Read-only boolean
.
ParentGroup
(getParentGroup()
) returns parent GroupShape object if shape is grouped.
public final IGroupShape getParentGroup()
Returns parent GroupShape object if shape is grouped. Otherwise returns null.
Read-only IGroupShape
.
IsGrouped
(isGrouped()
) determines whether the shape is grouped.
getParentGroup
in interface IShape
public final com.aspose.slides.IDOMObject getParent_Immediate()
Returns Parent_Immediate object.
Read-only IDOMObject
.
public final IBaseSlide getSlide()
Returns the parent slide of a shape.
Read-only IBaseSlide
.
getSlide
in interface ISlideComponent
public final IPresentation getPresentation()
Returns the parent presentation of a slide.
Read-only IPresentation
.
getPresentation
in interface IPresentationComponent