public interface IShapeCollection extends IGenericCollection<IShape>
Represents a collection of shapes.
| Modifier and Type | Method and Description |
|---|---|
IAudioFrame |
addAudioFrameCD(float x,
float y,
float width,
float height)
Creates a new audio frame linked to a CD track and adds it to the end of the shape collection.
|
IAudioFrame |
addAudioFrameEmbedded(float x,
float y,
float width,
float height,
IAudio audio)
Creates a new audio frame and adds it to the end of the shape collection using an
existing audio object from the Presentation.Audios list.
|
IAudioFrame |
addAudioFrameEmbedded(float x,
float y,
float width,
float height,
java.io.InputStream audio_stream)
Creates a new audio frame with an embedded WAV file and adds it to the end of the
shape collection.
|
IAudioFrame |
addAudioFrameLinked(float x,
float y,
float width,
float height,
java.lang.String fname)
Creates a new audio frame linked to an external audio file and adds it to the end of
the shape collection.
|
IAutoShape |
addAutoShape(int shapeType,
float x,
float y,
float width,
float height)
Creates a new auto shape with default formatting and adds it to the end of the
shape collection.
|
IAutoShape |
addAutoShape(int shapeType,
float x,
float y,
float width,
float height,
boolean createFromTemplate)
Creates a new auto shape and adds it to the end of the shape collection, optionally
initializing it with default template formatting.
|
IChart |
addChart(int type,
float x,
float y,
float width,
float height)
Creates a new chart, initializes it with sample series data and settings, and adds
it to the end of the shape collection.
|
IChart |
addChart(int type,
float x,
float y,
float width,
float height,
boolean initWithSample)
Creates a new chart, initializes it with sample series data and settings, and adds
it to the end of the shape collection.
|
IShape |
addClone(IShape sourceShape)
Creates a copy of the specified shape and adds it to the end of the shape collection.
|
IShape |
addClone(IShape sourceShape,
float x,
float y)
Creates a copy of the specified shape and adds it to the end of the shape collection.
|
IShape |
addClone(IShape sourceShape,
float x,
float y,
float width,
float height)
Creates a copy of the specified shape and adds it to the end of the shape collection.
|
IConnector |
addConnector(int shapeType,
float x,
float y,
float width,
float height)
Creates a new connector shape with default template styling and adds it to the end of the
shape collection.
|
IConnector |
addConnector(int shapeType,
float x,
float y,
float width,
float height,
boolean createFromTemplate)
Creates a new connector shape and adds it to the end of the shape collection,
optionally applying default template styling.
|
IGroupShape |
addGroupShape()
Creates a new empty group shape and adds it to the end of the shape collection.
|
IGroupShape |
addGroupShape(ISvgImage svgImage,
float x,
float y,
float width,
float height)
Creates a new group shape, converts the specified SVG image into individual shapes,
and adds the resulting group to the end of the shape collection.
|
IAutoShape |
addMathShape(float x,
float y,
float width,
float height)
Creates a new rectangle auto shape to host mathematical content and adds it to the
end of the shape collection.
|
IOleObjectFrame |
addOleObjectFrame(float x,
float y,
float width,
float height,
IOleEmbeddedDataInfo dataInfo)
Creates a new OLE object frame and adds it to the end of the shape collection.
|
IOleObjectFrame |
addOleObjectFrame(float x,
float y,
float width,
float height,
java.lang.String className,
java.lang.String path)
Creates a new OLE object frame and adds it to the end of the shape collection.
|
IPictureFrame |
addPictureFrame(int shapeType,
float x,
float y,
float width,
float height,
IPPImage image)
Creates a new picture frame containing the specified image and adds it to the end of the
shape collection.
|
ISectionZoomFrame |
addSectionZoomFrame(float x,
float y,
float width,
float height,
ISection section)
Creates a new Section Zoom frame and adds it to the end of the shape collection.
|
ISectionZoomFrame |
addSectionZoomFrame(float x,
float y,
float width,
float height,
ISection section,
IPPImage image)
Creates a new Section Zoom frame with a predefined image and adds it to the end of the
shape collection.
|
ISmartArt |
addSmartArt(float x,
float y,
float width,
float height,
int layoutType)
Creates a SmartArt diagram and adds it to the end of the shape collection.
|
ISummaryZoomFrame |
addSummaryZoomFrame(float x,
float y,
float width,
float height)
Creates a new Summary Zoom frame and adds it to the end of the shape collection.
|
ITable |
addTable(float x,
float y,
double[] columnWidths,
double[] rowHeights)
Creates a new table and adds it to the end of the shape collection.
|
IVideoFrame |
addVideoFrame(float x,
float y,
float width,
float height,
IVideo video)
Creates a new video frame and adds it to the end of the shape collection.
|
IVideoFrame |
addVideoFrame(float x,
float y,
float width,
float height,
java.lang.String fname)
Creates a new video frame and adds it to the end of the shape collection.
|
IZoomFrame |
addZoomFrame(float x,
float y,
float width,
float height,
ISlide slide)
Creates a new Zoom frame and adds it to the end of the shape collection.
|
IZoomFrame |
addZoomFrame(float x,
float y,
float width,
float height,
ISlide slide,
IPPImage image)
Creates a new Zoom frame and adds it to the end of the shape collection.
|
void |
clear()
Removes all shapes from the shape collection.
|
IShape |
get_Item(int index)
Gets the element at the specified index.
|
IGroupShape |
getParentGroup()
Gets the parent group shape object for the shapes collection.
|
int |
indexOf(IShape shape)
Returns the zero-based index of the first occurrence of the specified shape in the collection.
|
IAudioFrame |
insertAudioFrameCD(int index,
float x,
float y,
float width,
float height)
Creates a new audio frame linked to a CD track and inserts it into the shape collection
at the specified index.
|
IAudioFrame |
insertAudioFrameEmbedded(int index,
float x,
float y,
float width,
float height,
IAudio audio)
Creates a new audio frame and inserts it into the shape collection at the specified index
using an existing audio object from the Presentation.Audios list.
|
IAudioFrame |
insertAudioFrameEmbedded(int index,
float x,
float y,
float width,
float height,
java.io.InputStream audio_stream)
Creates a new audio frame with an embedded WAV file and inserts it into the shape
collection at the specified index.
|
IAudioFrame |
insertAudioFrameLinked(int index,
float x,
float y,
float width,
float height,
java.lang.String fname)
Creates a new audio frame linked to an external audio file and inserts it into the shape
collection at the specified index.
|
IAutoShape |
insertAutoShape(int index,
int shapeType,
float x,
float y,
float width,
float height)
Creates a new auto shape and inserts it into the shape collection at the specified index,
applying default template formatting.
|
IAutoShape |
insertAutoShape(int index,
int shapeType,
float x,
float y,
float width,
float height,
boolean createFromTemplate)
Creates a new auto shape and inserts it into the shape collection at the specified index,
optionally initializing it with default template styling.
|
IChart |
insertChart(int type,
float x,
float y,
float width,
float height,
int index)
Creates a new chart, initializes it with sample series data and settings,
and inserts it into the shape collection at the specified index.
|
IChart |
insertChart(int type,
float x,
float y,
float width,
float height,
int index,
boolean initWithSample)
Creates a new chart, initializes it with sample series data and settings,
and inserts it into the shape collection at the specified index.
|
IShape |
insertClone(int index,
IShape sourceShape)
Creates a copy of the specified shape and inserts it into the shape collection at the specified index.
|
IShape |
insertClone(int index,
IShape sourceShape,
float x,
float y)
Creates a copy of the specified shape and inserts it into the shape collection at the specified index.
|
IShape |
insertClone(int index,
IShape sourceShape,
float x,
float y,
float width,
float height)
Creates a copy of the specified shape and inserts it into the shape collection at the specified index.
|
IConnector |
insertConnector(int index,
int shapeType,
float x,
float y,
float width,
float height)
Creates a new connector shape and inserts it into the shape collection at the specified index,
applying default template styling.
|
IConnector |
insertConnector(int index,
int shapeType,
float x,
float y,
float width,
float height,
boolean createFromTemplate)
Creates a new connector shape and inserts it into the shape collection at the specified index,
optionally applying default template styling.
|
IGroupShape |
insertGroupShape(int index)
Creates a new empty group shape and inserts it to the shape collection at the specified index.
|
IOleObjectFrame |
insertOleObjectFrame(int index,
float x,
float y,
float width,
float height,
IOleEmbeddedDataInfo dataInfo)
Creates a new OLE object frame and inserts it into the shape collection at the specified index.
|
IOleObjectFrame |
insertOleObjectFrame(int index,
float x,
float y,
float width,
float height,
java.lang.String className,
java.lang.String path)
Creates a new OLE object frame and inserts it into the shape collection at the specified index.
|
IPictureFrame |
insertPictureFrame(int index,
int shapeType,
float x,
float y,
float width,
float height,
IPPImage image)
Creates a new picture frame containing the specified image and inserts it into the shape
collection at the specified index.
|
ISectionZoomFrame |
insertSectionZoomFrame(int index,
float x,
float y,
float width,
float height,
ISection section)
Creates a new Section Zoom frame and inserts it into to the shape collection at the
specified index.
|
ISectionZoomFrame |
insertSectionZoomFrame(int index,
float x,
float y,
float width,
float height,
ISection section,
IPPImage image)
Creates a new Section Zoom frame with a predefined image and inserts it into to the shape
collection at the specified index.
|
ISummaryZoomFrame |
insertSummaryZoomFrame(int index,
float x,
float y,
float width,
float height)
Creates a new Summary Zoom frame and inserts it into the shape collection at the specified index.
|
ITable |
insertTable(int index,
float x,
float y,
double[] columnWidths,
double[] rowHeights)
Creates a new table and inserts it into the shape collection at the specified index.
|
IVideoFrame |
insertVideoFrame(int index,
float x,
float y,
float width,
float height,
java.lang.String fname)
Creates a new video frame and inserts it into the shape collection at the specified index.
|
IZoomFrame |
insertZoomFrame(int index,
float x,
float y,
float width,
float height,
ISlide slide)
Creates a new Zoom frame and inserts it into the shape collection at the specified index.
|
IZoomFrame |
insertZoomFrame(int index,
float x,
float y,
float width,
float height,
ISlide slide,
IPPImage image)
Creates a new Zoom frame with a predefined image and inserts it into the shape collection
at the specified index.
|
void |
remove(IShape shape)
Removes the first occurrence of the specified shape from the shape collection.
|
void |
removeAt(int index)
Removes the shape at the specified index from the shape collection.
|
void |
reorder(int index,
IShape... shapes)
Moves the specified shapes within the shape collection, placing them starting at the given index.
|
void |
reorder(int index,
IShape shape)
Moves the specified shape to a new position within the shape collection.
|
IShape[] |
toArray()
Creates and returns an array that contains all shapes.
|
IShape[] |
toArray(int startIndex,
int count)
Creates and returns an array that contains all shapes in the specified range.
|
iteratorJavaiteratorIGroupShape getParentGroup()
Gets the parent group shape object for the shapes collection.
Read-only IGroupShape.
IChart addChart(int type, float x, float y, float width, float height)
Creates a new chart, initializes it with sample series data and settings, and adds it to the end of the shape collection.
type - The type of chart to add.x - The x-coordinate of the new chart, in points.y - The y-coordinate of the new chart, in points.width - The width of the chart, in points.height - The height of the chart, in points.IChart.IChart addChart(int type, float x, float y, float width, float height, boolean initWithSample)
Creates a new chart, initializes it with sample series data and settings, and adds it to the end of the shape collection.
type - The type of chart to add.x - The x-coordinate of the new chart, in points.y - The y-coordinate of the new chart, in points.width - The width of the chart, in points.height - The height of the chart, in points.initWithSample - True to initialize the new chart with sample series data and settings;
false to create the chart with no series and only minimal settings, which makes creation faster.IChart.ISmartArt addSmartArt(float x, float y, float width, float height, int layoutType)
Creates a SmartArt diagram and adds it to the end of the shape collection.
Example:Presentation pres = new Presentation(); try { ISlide slide = pres.getSlides().get_Item(0); ISmartArt smart = slide.getShapes().addSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList); } finally { if (pres != null) pres.dispose(); }
x - The x-coordinate of the diagram's frame, in points.y - The y-coordinate of the diagram's frame, in points.width - The width of the diagram's frame, in points.height - The height of the diagram's frame, in points.layoutType - The SmartArt layout type.ISmartArt.IChart insertChart(int type, float x, float y, float width, float height, int index)
Creates a new chart, initializes it with sample series data and settings, and inserts it into the shape collection at the specified index.
type - The type of chart to create.x - The x-coordinate of the new chart, in points.y - The y-coordinate of the new chart, in points.width - The width of the new chart, in points.height - The height of the new chart, in points.index - The zero-based index at which to insert the new chart in the shape collection.IChart.IChart insertChart(int type, float x, float y, float width, float height, int index, boolean initWithSample)
Creates a new chart, initializes it with sample series data and settings, and inserts it into the shape collection at the specified index.
type - The type of chart to create.x - The x-coordinate of the new chart, in points.y - The y-coordinate of the new chart, in points.width - The width of the new chart, in points.height - The height of the new chart, in points.index - The zero-based index at which to insert the new chart in the shape collection.initWithSample - True to initialize the new chart with sample series data and settings;
false to create the chart with no series and only minimal settings, which makes creation faster.IChart.IOleObjectFrame addOleObjectFrame(float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)
Creates a new OLE object frame and adds it to the end of the shape collection.
x - The x-coordinate of the new OLE frame, in points.y - The y-coordinate of the new OLE frame, in points.width - The width of the new OLE frame, in points.height - The height of the new OLE frame, in points.dataInfo - The embedded OLE data information (IOleEmbeddedDataInfo).IOleObjectFrame.IOleObjectFrame addOleObjectFrame(float x, float y, float width, float height, java.lang.String className, java.lang.String path)
Creates a new OLE object frame and adds it to the end of the shape collection.
x - The x-coordinate of the new OLE frame, in points.y - The y-coordinate of the new OLE frame, in points.width - The width of the new OLE frame, in points.height - The height of the new OLE frame, in points.className - The class name of the OLE object.path - The path to the linked file. This path is stored verbatim in the presentation. If a relative path is specified, the file will be inaccessible when opening the presentation from a different directory.
IOleObjectFrame.IOleObjectFrame insertOleObjectFrame(int index, float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)
Creates a new OLE object frame and inserts it into the shape collection at the specified index.
index - The zero-based index at which to insert the OLE object frame.x - The x-coordinate of the new OLE frame, in points.y - The y-coordinate of the new OLE frame, in points.width - The width of the new OLE frame, in points.height - The height of the new OLE frame, in points.dataInfo - The embedded OLE data information (IOleEmbeddedDataInfo).IOleObjectFrame.IOleObjectFrame insertOleObjectFrame(int index, float x, float y, float width, float height, java.lang.String className, java.lang.String path)
Creates a new OLE object frame and inserts it into the shape collection at the specified index.
index - The zero-based index at which to insert the OLE object frame.x - The x-coordinate of the new OLE frame, in points.y - The y-coordinate of the new OLE frame, in points.width - The width of the new OLE frame, in points.height - The height of the new OLE frame, in points.className - The class name of the OLE object.path - The path to the linked file. This path is stored verbatim in the presentation. If a relative path is specified, the file will be inaccessible when opening the presentation from a different directory.
IOleObjectFrame.IZoomFrame addZoomFrame(float x, float y, float width, float height, ISlide slide)
Creates a new Zoom frame and adds it to the end of the shape collection.
This example demonstrates adding a Zoom object to the end of a collection (assume that there are at least two slides in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1)); } finally { if (pres != null) pres.dispose(); }
x - The x-coordinate of the new Zoom frame, in points.y - The y-coordinate of the new Zoom frame, in points.width - The width of the new Zoom frame, in points.height - The height of the new Zoom frame, in points.slide - The ISlide referenced by the Zoom frame;
must belong to this presentation.IZoomFrame.com.aspose.ms.System.ArgumentException - Thrown if the referenced slide does not belong to the current presentation.IZoomFrame addZoomFrame(float x, float y, float width, float height, ISlide slide, IPPImage image)
Creates a new Zoom frame and adds it to the end of the shape collection.
This example demonstrates adding a Zoom object to the end of a collection (assume that there are at least two slides in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IPPImage image = pres.getImages().addImage(imageBytes); IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1), image); } catch(IOException e) { } finally { if (pres != null) pres.dispose(); }
x - The x-coordinate of the new Zoom frame, in points.y - The y-coordinate of the new Zoom frame, in points.width - The width of the new Zoom frame, in points.height - The height of the new Zoom frame, in points.slide - The ISlide referenced by the Zoom frame;
must belong to this presentation.image - The image for the referenced slide IPPImage.IZoomFrame.com.aspose.ms.System.ArgumentException - Thrown if the referenced slide does not belong to the current presentation.IZoomFrame insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide)
Creates a new Zoom frame and inserts it into the shape collection at the specified index.
This example demonstrates creation and inserting a Zoom object at the specified index of a collection (assume that there are at least two slides in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertZoomFrame(2, 150, 20, 50, 50, pres.getSlides().get_Item(1)); } finally { if (pres != null) pres.dispose(); }
index - The zero-based index at which to insert the Zoom frame.x - The x-coordinate of the new Zoom frame, in points.y - The y-coordinate of the new Zoom frame, in points.width - The width of the new Zoom frame, in points.height - The height of the new Zoom frame, in points.slide - The ISlide referenced by the Zoom frame.IZoomFrame.com.aspose.ms.System.ArgumentException - Thrown if the referenced slide does not belong to the current presentation.IZoomFrame insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide, IPPImage image)
Creates a new Zoom frame with a predefined image and inserts it into the shape collection at the specified index.
This example demonstrates creation and inserting a Zoom object at the specified index of a collection (assume that there are at least two slides in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IPPImage image = pres.getImages().addImage(imageBytes); IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertZoomFrame(2, 150, 20, 50, 50, pres.getSlides().get_Item(1), image); } catch(IOException e) { } finally { if (pres != null) pres.dispose(); }
index - The zero-based index at which to insert the Zoom frame.x - The x-coordinate of the new Zoom frame, in points.y - The y-coordinate of the new Zoom frame, in points.width - The width of the new Zoom frame, in points.height - The height of the new Zoom frame, in points.slide - The ISlide referenced by the Zoom frame.image - The image for the referenced slide IPPImage.IZoomFrame.com.aspose.ms.System.ArgumentException - Thrown if the referenced slide does not belong to the current presentation.ISectionZoomFrame addSectionZoomFrame(float x, float y, float width, float height, ISection section)
Creates a new Section Zoom frame and adds it to the end of the shape collection.
This example demonstrates adding a Section Zoom object to the end of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addSectionZoomFrame(150, 20, 50, 50, pres.getSections().get_Item(1)); } finally { if (pres != null) pres.dispose(); }
x - The x-coordinate of the new Section Zoom frame, in points.y - The y-coordinate of the new Section Zoom frame, in points.width - The width of the new Section Zoom frame, in points.height - The height of the new Section Zoom frame, in points.section - The ISection referenced by the Section Zoom frame;
must belong to this presentation and contain at least one slide.ISectionZoomFrame.com.aspose.ms.System.ArgumentException - Thrown if the referenced section does not belong to the current presentation or contains no slides.ISectionZoomFrame addSectionZoomFrame(float x, float y, float width, float height, ISection section, IPPImage image)
Creates a new Section Zoom frame with a predefined image and adds it to the end of the shape collection.
This example demonstrates adding a Section Zoom object to the end of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IPPImage image = pres.getImages().addImage(Files.readAllBytes(Paths.get("image.png"))); ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addSectionZoomFrame(150, 20, 50, 50, pres.getSections().get_Item(1), image); } catch (IOException e) { } finally { if (pres != null) pres.dispose(); }
x - The x-coordinate of the new Section Zoom frame, in points.y - The y-coordinate of the new Section Zoom frame, in points.width - The width of the new Section Zoom frame, in points.height - The height of the new Section Zoom frame, in points.section - The ISection referenced by the Section Zoom frame;
must belong to this presentation and contain at least one slide.image - The IPPImage to display within the Section Zoom frame.ISectionZoomFrame.com.aspose.ms.System.ArgumentException - Thrown if the referenced section does not belong to the current presentation or contains no slides.ISectionZoomFrame insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section)
Creates a new Section Zoom frame and inserts it into to the shape collection at the specified index.
This example demonstrates the creation and inserting a Section Zoom object at the specified index of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertSectionZoomFrame(2, 150, 20, 50, 50, pres.getSections().get_Item(1)); } finally { if (pres != null) pres.dispose(); }
index - The zero-based index at which to insert the Section Zoom frame.x - The x-coordinate of the new Section Zoom frame, in points.y - The y-coordinate of the new Section Zoom frame, in points.width - The width of the new Section Zoom frame, in points.height - The height of the new Section Zoom frame, in points.section - The ISection referenced by the Section Zoom frame;
must belong to this presentation and contain at least one slide.ISectionZoomFrame.com.aspose.ms.System.ArgumentException - Thrown if the referenced section does not belong to the current presentation or contains no slides.ISectionZoomFrame insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section, IPPImage image)
Creates a new Section Zoom frame with a predefined image and inserts it into to the shape collection at the specified index.
This example demonstrates the creation and inserting a Section Zoom object at the specified index of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IPPImage image = pres.getImages().addImage(Files.readAllBytes(Paths.get("image.png"))); ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertSectionZoomFrame(2, 150, 20, 50, 50, pres.getSections().get_Item(1), image); } catch(IOException e) { } finally { if (pres != null) pres.dispose(); }
index - The zero-based index at which to insert the Section Zoom frame.x - The x-coordinate of the new Section Zoom frame, in points.y - The y-coordinate of the new Section Zoom frame, in points.width - The width of the new Section Zoom frame, in points.height - The height of the new Section Zoom frame, in points.section - The ISection referenced by the Section Zoom frame;
must belong to this presentation and contain at least one slide.image - The image to display within the Section Zoom frame.ISectionZoomFrame.com.aspose.ms.System.ArgumentException - Thrown if the referenced section does not belong to the current presentation or contains no slides.ISummaryZoomFrame addSummaryZoomFrame(float x, float y, float width, float height)
Creates a new Summary Zoom frame and adds it to the end of the shape collection.
This example demonstrates adding a Summary Zoom object to the end of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { ISummaryZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addSummaryZoomFrame(150, 20, 500, 250); } finally { if (pres != null) pres.dispose(); }
x - The x-coordinate of the new Summary Zoom frame, in points.y - The y-coordinate of the new Summary Zoom frame, in points.width - The width of the new Summary Zoom frame, in points.height - The height of the new Summary Zoom frame, in points.
ISummaryZoomFrame.PptxEditException - Thrown if there are no sections in the presentation, or if the target slide does not belong to any section.ISummaryZoomFrame insertSummaryZoomFrame(int index, float x, float y, float width, float height)
Creates a new Summary Zoom frame and inserts it into the shape collection at the specified index.
This example demonstrates creation and inserting a Summary Zoom object at the specified index of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { ISummaryZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertSummaryZoomFrame(2, 150, 20, 50, 50); } finally { if (pres != null) pres.dispose(); }
index - The zero-based index at which to insert the Summary Zoom frame.x - The x-coordinate of the new Summary Zoom frame, in points.y - The y-coordinate of the new Summary Zoom frame, in points.width - The width of the new Summary Zoom frame, in points.height - The height of the new Summary Zoom frame, in points.
ISummaryZoomFrame.PptxEditException - Thrown if the presentation contains no sections, or if the target slide does not belong to any section.IVideoFrame addVideoFrame(float x, float y, float width, float height, java.lang.String fname)
Creates a new video frame and adds it to the end of the shape collection.
x - The x-coordinate of the new video frame, in points.y - The y-coordinate of the new video frame, in points.width - The width of the new video frame, in points.height - The height of the new video frame, in points.fname - The path or name of the video file to embed.IVideoFrame.IVideoFrame addVideoFrame(float x, float y, float width, float height, IVideo video)
Creates a new video frame and adds it to the end of the shape collection.
x - The x-coordinate of the new video frame, in points.y - The y-coordinate of the new video frame, in points.width - The width of the new video frame, in points.height - The height of the new video frame, in points.video - The IVideo to embed in the video frame.IVideoFrame.IVideoFrame insertVideoFrame(int index, float x, float y, float width, float height, java.lang.String fname)
Creates a new video frame and inserts it into the shape collection at the specified index.
index - The zero-based index at which to insert the video frame.x - The x-coordinate of the new video frame, in points.y - The y-coordinate of the new video frame, in points.width - The width of the new video frame, in points.height - The height of the new video frame, in points.fname - The path or name of the video file to embed.IVideoFrame.IAudioFrame addAudioFrameCD(float x, float y, float width, float height)
Creates a new audio frame linked to a CD track and adds it to the end of the shape collection.
x - The x-coordinate of the new audio frame, in points.y - The y-coordinate of the new audio frame, in points.width - The width of the new audio frame, in points.height - The height of the new audio frame, in points.IAudioFrame.IAudioFrame insertAudioFrameCD(int index, float x, float y, float width, float height)
Creates a new audio frame linked to a CD track and inserts it into the shape collection at the specified index.
index - The zero-based index at which to insert the audio frame.x - The x-coordinate of the new audio frame, in points.y - The y-coordinate of the new audio frame, in points.width - The width of the new audio frame, in points.height - The height of the new audio frame, in points.IAudioFrame.IAudioFrame addAudioFrameLinked(float x, float y, float width, float height, java.lang.String fname)
Creates a new audio frame linked to an external audio file and adds it to the end of the shape collection.
x - The x-coordinate of the new audio frame, in points.y - The y-coordinate of the new audio frame, in points.width - The width of the new audio frame, in points.height - The height of the new audio frame, in points.fname - The path or name of the external audio file to link.IAudioFrame.IAudioFrame insertAudioFrameLinked(int index, float x, float y, float width, float height, java.lang.String fname)
Creates a new audio frame linked to an external audio file and inserts it into the shape collection at the specified index.
index - The zero-based index at which to insert the audio frame.x - The x-coordinate of the new audio frame, in points.y - The y-coordinate of the new audio frame, in points.width - The width of the new audio frame, in points.height - The height of the new audio frame, in points.fname - The path or name of the external audio file to link.IAudioFrame.IAudioFrame addAudioFrameEmbedded(float x, float y, float width, float height, java.io.InputStream audio_stream)
Creates a new audio frame with an embedded WAV file and adds it to the end of the shape collection. The embedded audio is added to the Presentation.Audios collection.
x - The x-coordinate of the new audio frame, in points.y - The y-coordinate of the new audio frame, in points.width - The width of the new audio frame, in points.height - The height of the new audio frame, in points.audio_stream - An input stream containing WAV audio data to embed.IAudioFrame.IAudioFrame addAudioFrameEmbedded(float x, float y, float width, float height, IAudio audio)
Creates a new audio frame and adds it to the end of the shape collection using an existing audio object from the Presentation.Audios list.
x - The x-coordinate of the new audio frame, in points.y - The y-coordinate of the new audio frame, in points.width - The width of the new audio frame, in points.height - The height of the new audio frame, in points.audio - An IAudio instance from the Presentation.Audios collection.IAudioFrame.IAudioFrame insertAudioFrameEmbedded(int index, float x, float y, float width, float height, java.io.InputStream audio_stream)
Creates a new audio frame with an embedded WAV file and inserts it into the shape collection at the specified index. The embedded audio is added to the Presentation.Audios collection.
index - The zero-based index at which to insert the audio frame.x - The x-coordinate of the new audio frame, in points.y - The y-coordinate of the new audio frame, in points.width - The width of the new audio frame, in points.height - The height of the new audio frame, in points.audio_stream - An input stream containing WAV audio data to embed.IAudioFrame.IAudioFrame insertAudioFrameEmbedded(int index, float x, float y, float width, float height, IAudio audio)
Creates a new audio frame and inserts it into the shape collection at the specified index using an existing audio object from the Presentation.Audios list.
index - The zero-based index at which to insert the audio frame.x - The x-coordinate of the new audio frame, in points.y - The y-coordinate of the new audio frame, in points.width - The width of the new audio frame, in points.height - The height of the new audio frame, in points.audio - An IAudio instance from the Presentation.Audios collection to embed.IAudioFrame.int indexOf(IShape shape)
Returns the zero-based index of the first occurrence of the specified shape in the collection.
shape - The shape to locate in the collection.IShape[] toArray()
Creates and returns an array that contains all shapes.
IShape objects.IShape[] toArray(int startIndex, int count)
Creates and returns an array that contains all shapes in the specified range.
startIndex - The index of the first shape to return.count - The number of shapes to return.IShape objects.void reorder(int index,
IShape shape)
Moves the specified shape to a new position within the shape collection.
index - The zero-based target index where the shape will be placed.shape - The IShape to move within the collection.void reorder(int index,
IShape... shapes)
Moves the specified shapes within the shape collection, placing them starting at the given index.
index - The zero-based target index where the first specified shape will be placed;
subsequent shapes follow in the order provided.shapes - One or more IShape instances to move within the collection.IAutoShape addAutoShape(int shapeType, float x, float y, float width, float height)
Creates a new auto shape with default formatting and adds it to the end of the shape collection.
shapeType - The ShapeType of the auto shape to add.x - The x-coordinate of the shape's frame, in points.y - The y-coordinate of the shape's frame, in points.width - The width of the shape's frame, in points.height - The height of the shape's frame, in points.IAutoShape.IAutoShape addAutoShape(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)
Creates a new auto shape and adds it to the end of the shape collection, optionally initializing it with default template formatting.
shapeType - The ShapeType of the auto shape to add.x - The x-coordinate of the shape's frame, in points.y - The y-coordinate of the shape's frame, in points.width - The width of the shape's frame, in points.height - The height of the shape's frame, in points.createFromTemplate - True to apply default template styling (simple style, centered text, and non-empty name)
to the new shape; false to create the shape with all properties set to their default values.IAutoShape.IAutoShape addMathShape(float x, float y, float width, float height)
Creates a new rectangle auto shape to host mathematical content and adds it to the end of the shape collection.
x - The x-coordinate of the shape's frame, in points.y - The y-coordinate of the shape's frame, in points.width - The width of the shape's frame, in points.height - The height of the shape's frame, in points.IAutoShape.IAutoShape insertAutoShape(int index, int shapeType, float x, float y, float width, float height)
Creates a new auto shape and inserts it into the shape collection at the specified index, applying default template formatting.
index - The zero-based index at which to insert the new auto shape.shapeType - The ShapeType of the auto shape to insert.x - The x-coordinate of the shape's frame, in points.y - The y-coordinate of the shape's frame, in points.width - The width of the shape's frame, in points.height - The height of the shape's frame, in points.IAutoShape.IAutoShape insertAutoShape(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)
Creates a new auto shape and inserts it into the shape collection at the specified index, optionally initializing it with default template styling.
index - The zero-based index at which to insert the auto shape.shapeType - The ShapeType of the auto shape to insert.x - The x-coordinate of the shape's frame, in points.y - The y-coordinate of the shape's frame, in points.width - The width of the shape's frame, in points.height - The height of the shape's frame, in points.createFromTemplate - True to apply default template styling (including a non-empty name, simple style, and centered text);
false to create the shape with all properties set to their defaults.IAutoShape.IGroupShape addGroupShape()
Creates a new empty group shape and adds it to the end of the shape collection. The group's frame will automatically adjust to fit any shapes added to it.
IGroupShape.IGroupShape addGroupShape(ISvgImage svgImage, float x, float y, float width, float height)
Creates a new group shape, converts the specified SVG image into individual shapes, and adds the resulting group to the end of the shape collection.
svgImage - The ISvgImage containing vector content to convert into shapes.x - The x-coordinate of the group's frame, in points.y - The y-coordinate of the group's frame, in points.width - The width of the group's frame, in points.height - The height of the group's frame, in points.IGroupShape.IGroupShape insertGroupShape(int index)
Creates a new empty group shape and inserts it to the shape collection at the specified index. The group's frame will automatically adjust to fit any shapes added to it.
index - The zero-based index at which to insert the group shape.IGroupShape.IConnector addConnector(int shapeType, float x, float y, float width, float height)
Creates a new connector shape with default template styling and adds it to the end of the shape collection.
shapeType - The ShapeType of the connector shape to add.x - The x-coordinate of the connector's frame, in points.y - The y-coordinate of the connector's frame, in points.width - The width of the connector's frame, in points.height - The height of the connector's frame, in points.IConnector.IConnector addConnector(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)
Creates a new connector shape and adds it to the end of the shape collection, optionally applying default template styling.
shapeType - The ShapeType of the connector shape to create.x - The x-coordinate of the connector's frame, in points.y - The y-coordinate of the connector's frame, in points.width - The width of the connector's frame, in points.height - The height of the connector's frame, in points.createFromTemplate - True to apply default template styling (non-empty name, simple style);
false to create the connector with default property values.IConnector.IConnector insertConnector(int index, int shapeType, float x, float y, float width, float height)
Creates a new connector shape and inserts it into the shape collection at the specified index, applying default template styling.
index - The zero-based index at which to insert the connector shape.shapeType - The ShapeType of the connector shape to insert.x - The x-coordinate of the connector's frame, in points.y - The y-coordinate of the connector's frame, in points.width - The width of the connector's frame, in points.height - The height of the connector's frame, in points.IConnector.IConnector insertConnector(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)
Creates a new connector shape and inserts it into the shape collection at the specified index, optionally applying default template styling.
index - The zero-based index at which to insert the connector shape.shapeType - The ShapeType of the connector shape to insert.x - The x-coordinate of the connector's frame, in points.y - The y-coordinate of the connector's frame, in points.width - The width of the connector's frame, in points.height - The height of the connector's frame, in points.createFromTemplate - True to apply default template styling (non-empty name, simple style);
false to create the connector with default property values.IConnector.IPictureFrame addPictureFrame(int shapeType, float x, float y, float width, float height, IPPImage image)
Creates a new picture frame containing the specified image and adds it to the end of the shape collection.
shapeType - Specifies the shape type contained in ShapeType,
except for all kinds of lines:
ShapeType.Line,
ShapeType.StraightConnector1,
ShapeType.BentConnector2,
ShapeType.BentConnector3,
ShapeType.BentConnector4,
ShapeType.BentConnector5,
ShapeType.CurvedConnector2,
ShapeType.CurvedConnector3,
ShapeType.CurvedConnector4,
ShapeType.CurvedConnector5.
x - The x-coordinate of the picture frame, in points.y - The y-coordinate of the picture frame, in points.width - The width of the picture frame, in points.height - The height of the picture frame, in points.image - The IPPImage to display in the picture frame.IPictureFrame.IPictureFrame insertPictureFrame(int index, int shapeType, float x, float y, float width, float height, IPPImage image)
Creates a new picture frame containing the specified image and inserts it into the shape collection at the specified index.
index - The zero-based index at which to insert the picture frame.shapeType - Specifies the shape type contained in ShapeType,
except for all kinds of lines:
ShapeType.Line,
ShapeType.StraightConnector1,
ShapeType.BentConnector2,
ShapeType.BentConnector3,
ShapeType.BentConnector4,
ShapeType.BentConnector5,
ShapeType.CurvedConnector2,
ShapeType.CurvedConnector3,
ShapeType.CurvedConnector4,
ShapeType.CurvedConnector5.
x - The x-coordinate of the picture frame, in points.y - The y-coordinate of the picture frame, in points.width - The width of the picture frame, in points.height - The height of the picture frame, in points.image - The IPPImage to display in the picture frame.IPictureFrame.ITable addTable(float x, float y, double[] columnWidths, double[] rowHeights)
Creates a new table and adds it to the end of the shape collection.
x - The x-coordinate of the table, in points.y - The y-coordinate of the table, in points.columnWidths - An array of doubles representing the widths of the table's
columns, in points.rowHeights - An array of doubles representing the heights of the table's
rows, in points.ITable.ITable insertTable(int index, float x, float y, double[] columnWidths, double[] rowHeights)
Creates a new table and inserts it into the shape collection at the specified index.
index - The zero-based index at which to insert the table.x - The x-coordinate of the table, in points.y - The y-coordinate of the table, in points.columnWidths - An array of doubles representing the widths of the table's
columns, in points.rowHeights - An array of doubles representing the heights of the table's
rows, in points.ITable.void removeAt(int index)
Removes the shape at the specified index from the shape collection.
index - The zero-based index of the shape to remove.void remove(IShape shape)
Removes the first occurrence of the specified shape from the shape collection.
shape - The IShape to remove.void clear()
Removes all shapes from the shape collection.
IShape addClone(IShape sourceShape, float x, float y, float width, float height)
Creates a copy of the specified shape and adds it to the end of the shape collection.
sourceShape - The shape to clone.x - The x-coordinate of the cloned shape's frame, in points.y - The y-coordinate of the cloned shape's frame, in points.width - The width of the cloned shape's frame, in points.height - The height of the cloned shape's frame, in points.IShape.IShape addClone(IShape sourceShape, float x, float y)
Creates a copy of the specified shape and adds it to the end of the shape collection.
The new shape retains the width and height of the sourceShape.
IShape addClone(IShape sourceShape)
Creates a copy of the specified shape and adds it to the end of the shape collection. The cloned shape retains the original's position and size.
IShape insertClone(int index, IShape sourceShape, float x, float y, float width, float height)
Creates a copy of the specified shape and inserts it into the shape collection at the specified index.
index - The zero-based index at which to insert the cloned shape.sourceShape - The IShape to clone.x - The x-coordinate of the cloned shape's frame, in points.y - The y-coordinate of the cloned shape's frame, in points.width - The width of the cloned shape's frame, in points.height - The height of the cloned shape's frame, in points.IShape.IShape insertClone(int index, IShape sourceShape, float x, float y)
Creates a copy of the specified shape and inserts it into the shape collection at the specified index.
The new shape retains the width and height of the sourceShape.
Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.