PictureFrame
Inheritance: java.lang.Object, com.aspose.slides.Shape, com.aspose.slides.GeometryShape
All Implemented Interfaces: com.aspose.slides.IPictureFrame
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(); }
Methods
Method | Description |
---|---|
getPictureFrameLock() | Returns shape’s locks. |
getShapeType() | |
setShapeType(int value) | |
getPictureFormat() | Returns the PictureFillFormat object for a picture frame. |
getRelativeScaleHeight() | Returns or sets the scale of height(relative to original picture size) of the picture frame. |
setRelativeScaleHeight(float value) | Returns or sets the scale of height(relative to original picture size) of the picture frame. |
getRelativeScaleWidth() | Returns or sets the scale of width (relative to original picture size) of the picture frame. |
setRelativeScaleWidth(float value) | Returns or sets the scale of width (relative to original picture size) of the picture frame. |
getPictureFrameLock()
public final IPictureFrameLock getPictureFrameLock()
Returns shape’s locks. Read-only IPictureFrameLock.
Returns: IPictureFrameLock
getShapeType()
public 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/write ShapeType.
Returns: int
setShapeType(int value)
public 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/write ShapeType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
getPictureFormat()
public final IPictureFillFormat getPictureFormat()
Returns the PictureFillFormat object for a picture frame. Read-only IPictureFillFormat.
Returns: IPictureFillFormat
getRelativeScaleHeight()
public 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 .
Returns: float
setRelativeScaleHeight(float value)
public 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 .
Parameters:
Parameter | Type | Description |
---|---|---|
value | float |
getRelativeScaleWidth()
public 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 .
Returns: float
setRelativeScaleWidth(float value)
public 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 .
Parameters:
Parameter | Type | Description |
---|---|---|
value | float |