public class PictureFrame extends GeometryShape implements IPictureFrame
Represents a frame with a picture inside.
The following examples shows how to change Audio Frame Thumbnail.Presentation presentation = new Presentation(); try { ISlide slide = presentation.getSlides().get_Item(0); // Adds an audio frame to the slide with a specified position and size. FileInputStream audioStream = new FileInputStream("sample2.mp3"); IAudioFrame audioFrame = slide.getShapes().addAudioFrameEmbedded(150, 100, 50, 50, audioStream); audioStream.close(); // Adds an image to presentation resources. FileInputStream imageStream = new FileInputStream("eagle.jpeg"); IPPImage audioImage = presentation.getImages().addImage(imageStream); imageStream.close(); // Sets the image for the audio frame. audioFrame.getPictureFormat().getPicture().setImage(audioImage); //Saves the modified presentation to disk presentation.save("example_out.pptx", SaveFormat.Pptx); } catch(IOException e) { } finally { if (presentation != null) presentation.dispose(); }
| Modifier and Type | Method and Description |
|---|---|
IPictureFillFormat |
getPictureFormat()
Returns the PictureFillFormat object for a picture frame.
|
IPictureFrameLock |
getPictureFrameLock()
Returns shape's locks.
|
float |
getRelativeScaleHeight()
Returns or sets the scale of height(relative to original picture size) of the picture frame.
|
float |
getRelativeScaleWidth()
Returns or sets the scale of width (relative to original picture size) of the picture frame.
|
int |
getShapeType() |
boolean |
isCameo()
Determines whether the PictureFrame is Cameo object or not.
|
void |
setRelativeScaleHeight(float value)
Returns or sets the scale of height(relative to original picture size) of the picture frame.
|
void |
setRelativeScaleWidth(float value)
Returns or sets the scale of width (relative to original picture size) of the picture frame.
|
void |
setShapeType(int value) |
createShapeElements, getAdjustments, getGeometryPaths, getShapeStyle, setGeometryPath, setGeometryPathsaddPlaceholder, getAlternativeText, getAlternativeTextTitle, getBasePlaceholder, getBlackWhiteMode, getConnectionSiteCount, getCustomData, getEffectFormat, getFillFormat, getFrame, getHeight, getHidden, getHyperlinkClick, getHyperlinkManager, getHyperlinkMouseOver, getImage, getImage, getLineFormat, getName, getOfficeInteropShapeId, getParent_Immediate, getParentGroup, getPlaceholder, getPresentation, getRawFrame, getRotation, getShapeLock, getSlide, getThreeDFormat, getThumbnail, getThumbnail, getUniqueId, getWidth, getX, getY, getZOrderPosition, isDecorative, isGrouped, isTextHolder, removePlaceholder, setAlternativeText, setAlternativeTextTitle, setBlackWhiteMode, setDecorative, setFrame, setHeight, setHidden, setHyperlinkClick, setHyperlinkMouseOver, setName, setRawFrame, setRotation, setWidth, setX, setY, writeAsSvg, writeAsSvgequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateShapeElements, getAdjustments, getGeometryPaths, getShapeStyle, setGeometryPath, setGeometryPathsaddPlaceholder, getAlternativeText, getAlternativeTextTitle, getBasePlaceholder, getBlackWhiteMode, getConnectionSiteCount, getCustomData, getEffectFormat, getFillFormat, getFrame, getHeight, getHidden, getImage, getImage, getLineFormat, getName, getOfficeInteropShapeId, getParentGroup, getPlaceholder, getRawFrame, getRotation, getShapeLock, getThreeDFormat, getThumbnail, getThumbnail, getUniqueId, getWidth, getX, getY, getZOrderPosition, isDecorative, isGrouped, isTextHolder, removePlaceholder, setAlternativeText, setAlternativeTextTitle, setBlackWhiteMode, setDecorative, setFrame, setHeight, setHidden, setName, setRawFrame, setRotation, setWidth, setX, setY, writeAsSvg, writeAsSvggetSlidegetPresentationgetHyperlinkClick, getHyperlinkManager, getHyperlinkMouseOver, setHyperlinkClick, setHyperlinkMouseOverpublic final IPictureFrameLock getPictureFrameLock()
Returns shape's locks.
Read-only IPictureFrameLock.
getPictureFrameLock in interface IPictureFramepublic int getShapeType()
Returns or sets the AutoShape type for a PictureFrame.
There are allowable all items of the set ShapeType,
except all sorts of lines:
ShapeType.Line,
ShapeType.StraightConnector1,
ShapeType.BentConnector2,
ShapeType.BentConnector3,
ShapeType.BentConnector4,
ShapeType.BentConnector5,
ShapeType.CurvedConnector2,
ShapeType.CurvedConnector3,
ShapeType.CurvedConnector4,
ShapeType.CurvedConnector5.
Read/writeShapeType.
getShapeType in interface IGeometryShapegetShapeType in class GeometryShapepublic void setShapeType(int value)
Returns or sets the AutoShape type for a PictureFrame.
There are allowable all items of the set ShapeType,
except all sorts of lines:
ShapeType.Line,
ShapeType.StraightConnector1,
ShapeType.BentConnector2,
ShapeType.BentConnector3,
ShapeType.BentConnector4,
ShapeType.BentConnector5,
ShapeType.CurvedConnector2,
ShapeType.CurvedConnector3,
ShapeType.CurvedConnector4,
ShapeType.CurvedConnector5.
Read/writeShapeType.
setShapeType in interface IGeometryShapesetShapeType in class GeometryShapepublic final IPictureFillFormat getPictureFormat()
Returns the PictureFillFormat object for a picture frame.
Read-only IPictureFillFormat.
getPictureFormat in interface IPictureFramepublic final float getRelativeScaleHeight()
Returns or sets the scale of height(relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%.
Read/write float.
getRelativeScaleHeight in interface IPictureFramepublic final void setRelativeScaleHeight(float value)
Returns or sets the scale of height(relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%.
Read/write float.
setRelativeScaleHeight in interface IPictureFramepublic final float getRelativeScaleWidth()
Returns or sets the scale of width (relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%.
Read/write float.
getRelativeScaleWidth in interface IPictureFramepublic final void setRelativeScaleWidth(float value)
Returns or sets the scale of width (relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%.
Read/write float.
setRelativeScaleWidth in interface IPictureFramepublic final boolean isCameo()
Determines whether the PictureFrame is Cameo object or not. Read only boolean.
Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.