IShapeCollection

All Implemented Interfaces: com.aspose.slides.IGenericCollection

public interface IShapeCollection extends IGenericCollection<IShape>

Represents a collection of a shapes.

Methods

MethodDescription
get_Item(int index)Gets the element at the specified index.
getParentGroup()Returns parent GroupShape object for a shapes collection.
addChart(int type, float x, float y, float width, float height)Creates a new Chart, initialize it with sample series data and settings and adds it to the end of the collection.
addChart(int type, float x, float y, float width, float height, boolean initWithSample)Creates a new Chart and adds it to the end of the collection.
addSmartArt(float x, float y, float width, float height, int layoutType)Add SmartArt diagram.
insertChart(int type, float x, float y, float width, float height, int index)Creates a new Chart, initialize it with sample series data and settings and inserts it to the specified position in the collection.
insertChart(int type, float x, float y, float width, float height, int index, boolean initWithSample)Creates a new Chart and inserts it to the specified position in the collection.
addOleObjectFrame(float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)Adds a new OLE object to the end of a collection.
addOleObjectFrame(float x, float y, float width, float height, String className, String path)Adds a new OLE object to the end of a collection.
insertOleObjectFrame(int index, float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)Creates a new OLE object and inserts it to a collection at the specified index.
insertOleObjectFrame(int index, float x, float y, float width, float height, String className, String path)Creates a new OLE object and inserts it to a collection at the specified index.
addZoomFrame(float x, float y, float width, float height, ISlide slide)Adds a new Zoom object to the end of a collection.
addZoomFrame(float x, float y, float width, float height, ISlide slide, IPPImage image)Adds a new Zoom object to the end of a collection.
insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide)Creates a new Zoom object and inserts it to a collection at the specified index.
insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide, IPPImage image)Creates a new Zoom object and inserts it to a collection at the specified index.
addSectionZoomFrame(float x, float y, float width, float height, ISection section)Adds a new Section Zoom object to the end of a collection.
addSectionZoomFrame(float x, float y, float width, float height, ISection section, IPPImage image)Adds a new Section Zoom object to the end of a collection with a predefined image.
insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section)Creates a new Section Zoom object and inserts into to a collection at the specified index.
insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section, IPPImage image)Creates a new Section Zoom object and inserts it to a collection at the specified index.
addSummaryZoomFrame(float x, float y, float width, float height)Adds a new Summary Zoom object to the end of a collection.
insertSummaryZoomFrame(int index, float x, float y, float width, float height)Creates a new Summary Zoom object and inserts it to a collection at the specified index.
addVideoFrame(float x, float y, float width, float height, String fname)Adds a new video frame to the end of a collection.
addVideoFrame(float x, float y, float width, float height, IVideo video)Adds a new video frame to the end of a collection.
insertVideoFrame(int index, float x, float y, float width, float height, String fname)Creates a new video frame and inserts it to a collection at the specified index.
addAudioFrameCD(float x, float y, float width, float height)Adds an AudioFrame with CD to the end of collection.
insertAudioFrameCD(int index, float x, float y, float width, float height)Insert an AudioFrame with CD.
addAudioFrameLinked(float x, float y, float width, float height, String fname)Adds a new audio frame with linked audio file to the end of a collection.
insertAudioFrameLinked(int index, float x, float y, float width, float height, String fname)Creates a new audio frame with linked audio file and inserts it to a collection at the specified index.
addAudioFrameEmbedded(float x, float y, float width, float height, InputStream audio_stream)Adds a new audio frame with embedded audio file to the end of a collection.
addAudioFrameEmbedded(float x, float y, float width, float height, IAudio audio)Adds a new audio frame with embedded audio file to the end of a collection.
insertAudioFrameEmbedded(int index, float x, float y, float width, float height, InputStream audio_stream)Insert an AudioFrame with embedded audio file.
insertAudioFrameEmbedded(int index, float x, float y, float width, float height, IAudio audio)Insert an AudioFrame with embedded audio file.
indexOf(IShape shape)Returns the zero-based index of the first occurrence of a shape in the collection.
toArray()Creates and returns an array with all shapse in it.
toArray(int startIndex, int count)Creates and returns an array with all shapes from the specified range in it.
reorder(int index, IShape shape)Moves a shape from the collection to the specified position.
reorder(int index, IShape[] shapes)Moves shapes from the collection to the specified position.
addAutoShape(int shapeType, float x, float y, float width, float height)Creates a new AutoShape, tunes it from default template and adds it to the end of the collection.
addAutoShape(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)Creates a new AutoShape and adds it to the end of the collection.
addMathShape(float x, float y, float width, float height)Creates a new AutoShape of the type Rectangle to host mathematical content inside and adds it to the end of the collection.
insertAutoShape(int index, int shapeType, float x, float y, float width, float height)Creates a new AutoShape, tunes it from default template and inserts it to the collection at the specified index.
insertAutoShape(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)Creates a new AutoShape and inserts it to the collection at the specified index.
addGroupShape()Creates a new GroupShape and adds it to the end of the collection.
addGroupShape(ISvgImage svgImage, float x, float y, float width, float height)Creates a new GroupShape, fills it with converted shapes from SVG and adds it to the end of the collection.
insertGroupShape(int index)Creates a new GroupShape and inserts it to the collection at the specified index.
addConnector(int shapeType, float x, float y, float width, float height)Creates a new Connector, tunes it from default template and adds it to the end of the collection.
addConnector(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)Creates a new Connector and adds it to the end of the collection.
insertConnector(int index, int shapeType, float x, float y, float width, float height)Creates a new Connector, tunes it from default template and inserts it to the collection at the specified index.
insertConnector(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)Creates a new Connector and inserts it to the collection at the specified index.
addPictureFrame(int shapeType, float x, float y, float width, float height, IPPImage image)Creates a new PictureFrame and adds it to the end of the collection.
insertPictureFrame(int index, int shapeType, float x, float y, float width, float height, IPPImage image)Creates a new PictureFrame and inserts it to the collection at the specified index.
addTable(float x, float y, double[] columnWidths, double[] rowHeights)Creates a new Table and adds it to the end of the collection.
insertTable(int index, float x, float y, double[] columnWidths, double[] rowHeights)Creates a new Table and inserts it to the collection at the specified index.
removeAt(int index)Removes the element at the specified index of the collection.
remove(IShape shape)Removes the first occurrence of a specific shape from the collection.
clear()Removes all shapes from the collection.
addClone(IShape sourceShape, float x, float y, float width, float height)Adds a copy of a specified shape to the end of the collection.
addClone(IShape sourceShape, float x, float y)Adds a copy of a specified shape to the end of the collection.
addClone(IShape sourceShape)Adds a copy of a specified shape to the end of the collection.
insertClone(int index, IShape sourceShape, float x, float y, float width, float height)Inserts a copy of a specified shape to specified position of the collection.
insertClone(int index, IShape sourceShape, float x, float y)Inserts a copy of a specified shape to specified position of the collection.
insertClone(int index, IShape sourceShape)Inserts a copy of a specified shape to specified position of the collection.

get_Item(int index)

public abstract IShape get_Item(int index)

Gets the element at the specified index. Read-only IShape.

Parameters:

ParameterTypeDescription
indexint

Returns: IShape

getParentGroup()

public abstract IGroupShape getParentGroup()

Returns parent GroupShape object for a shapes collection. Read-only IGroupShape.

Returns: IGroupShape

addChart(int type, float x, float y, float width, float height)

public abstract IChart addChart(int type, float x, float y, float width, float height)

Creates a new Chart, initialize it with sample series data and settings and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
typeintType of chart.
xfloatX coordinate of a new chart.
yfloatY coordinate of a new chart.
widthfloatChart’s width.
heightfloatChart’s height.

Returns: IChart - Created chart.

addChart(int type, float x, float y, float width, float height, boolean initWithSample)

public abstract IChart addChart(int type, float x, float y, float width, float height, boolean initWithSample)

Creates a new Chart and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
typeintType of chart.
xfloatX coordinate of a new chart.
yfloatY coordinate of a new chart.
widthfloatChart’s width.
heightfloatChart’s height.
initWithSamplebooleanIf true then new chart will be initialized with sample series data and settings. If false then new chart will have no series and minimum settings. In this case chart creation will be more fast.

Returns: IChart - Created chart.

addSmartArt(float x, float y, float width, float height, int layoutType)

public abstract ISmartArt addSmartArt(float x, float y, float width, float height, int layoutType)

Add SmartArt diagram.


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();
 }

Parameters:

ParameterTypeDescription
xfloatThe X-coordinate for a left side of diagram’s frame.
yfloatThe Y-coordinate for a left side of diagram’s frame.
widthfloatThe width of diagram’s frame.
heightfloatThe height of diagram’s frame.
layoutTypeintThe type of SmartArt diagram

Returns: ISmartArt - Create SmartArt diagram

insertChart(int type, float x, float y, float width, float height, int index)

public abstract IChart insertChart(int type, float x, float y, float width, float height, int index)

Creates a new Chart, initialize it with sample series data and settings and inserts it to the specified position in the collection.

Parameters:

ParameterTypeDescription
typeintType of chart.
xfloatX coordinate of a new chart.
yfloatY coordinate of a new chart.
widthfloatChart’s width.
heightfloatChart’s height.
indexintChart’s position in the collection.

Returns: IChart - Created chart.

insertChart(int type, float x, float y, float width, float height, int index, boolean initWithSample)

public abstract IChart insertChart(int type, float x, float y, float width, float height, int index, boolean initWithSample)

Creates a new Chart and inserts it to the specified position in the collection.

Parameters:

ParameterTypeDescription
typeintType of chart.
xfloatX coordinate of a new chart.
yfloatY coordinate of a new chart.
widthfloatChart’s width.
heightfloatChart’s height.
indexintChart’s position in the collection.
initWithSamplebooleanIf true then new chart will be initialized with sample series data and settings. If false then new chart will have no series and minimum settings. In this case chart creation will be more fast.

Returns: IChart - Created chart.

addOleObjectFrame(float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)

public abstract IOleObjectFrame addOleObjectFrame(float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)

Adds a new OLE object to the end of a collection.

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new OLE frame.
yfloatY coordinate of a new OLE frame.
widthfloatWidth of a new OLE frame.
heightfloatHeight of a new OLE frame.
dataInfoIOleEmbeddedDataInfoEmbedded data info IOleEmbeddedDataInfo.

Returns: IOleObjectFrame - Created OLE object.

addOleObjectFrame(float x, float y, float width, float height, String className, String path)

public abstract IOleObjectFrame addOleObjectFrame(float x, float y, float width, float height, String className, String path)

Adds a new OLE object to the end of a collection.

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new OLE frame.
yfloatY coordinate of a new OLE frame.
widthfloatWidth of a new OLE frame.
heightfloatHeight of a new OLE frame.
classNamejava.lang.StringName of an OLE class.
pathjava.lang.Stringpath to the linked file.

Returns: IOleObjectFrame - Created OLE object.

insertOleObjectFrame(int index, float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)

public abstract IOleObjectFrame insertOleObjectFrame(int index, float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)

Creates a new OLE object and inserts it to a collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which OLE object should be inserted.
xfloatX coordinate of a new OLE frame.
yfloatY coordinate of a new OLE frame.
widthfloatWidth of a new OLE frame.
heightfloatHeight of a new OLE frame.
dataInfoIOleEmbeddedDataInfoEmbedded data info IOleEmbeddedDataInfo.

Returns: IOleObjectFrame - Created OLE object.

insertOleObjectFrame(int index, float x, float y, float width, float height, String className, String path)

public abstract IOleObjectFrame insertOleObjectFrame(int index, float x, float y, float width, float height, String className, String path)

Creates a new OLE object and inserts it to a collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which OLE object should be inserted.
xfloatX coordinate of a new OLE frame.
yfloatY coordinate of a new OLE frame.
widthfloatWidth of a new OLE frame.
heightfloatHeight of a new OLE frame.
classNamejava.lang.StringName of an OLE class.
pathjava.lang.StringPath to the linked file.

Returns: IOleObjectFrame - Created OLE object.

addZoomFrame(float x, float y, float width, float height, ISlide slide)

public abstract IZoomFrame addZoomFrame(float x, float y, float width, float height, ISlide slide)

Adds a new Zoom object to the end of a 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();
 }

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new Zoom frame float.
yfloatY coordinate of a new Zoom frame float.
widthfloatWidth of a new Zoom frame float.
heightfloatHeight of a new Zoom frame float.
slideISlideThe slide object referenced by the Zoom frame ISlide.

Returns: IZoomFrame - Created Zoom object IZoomFrame.

addZoomFrame(float x, float y, float width, float height, ISlide slide, IPPImage image)

public abstract IZoomFrame addZoomFrame(float x, float y, float width, float height, ISlide slide, IPPImage image)

Adds a new Zoom object to the end of a 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();
 }

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new Zoom frame float.
yfloatY coordinate of a new Zoom frame float.
widthfloatWidth of a new Zoom frame float.
heightfloatHeight of a new Zoom frame float.
slideISlideThe slide object referenced by the Zoom frame ISlide.
imageIPPImageThe image for the referenced slide IPPImage

Returns: IZoomFrame - Created Zoom object IZoomFrame.

insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide)

public abstract IZoomFrame insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide)

Creates a new Zoom object and inserts it to a 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();
 }

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which Zoom frame should be inserted.
xfloatX coordinate of a new Zoom frame float.
yfloatY coordinate of a new Zoom frame float.
widthfloatWidth of a new Zoom frame float.
heightfloatHeight of a new Zoom frame float.
slideISlideThe slide object referenced by the Zoom frame ISlide.

Returns: IZoomFrame - Created Zoom object IZoomFrame.

insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide, IPPImage image)

public abstract IZoomFrame insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide, IPPImage image)

Creates a new Zoom object and inserts it to a 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();
 }

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which Zoom frame should be inserted.
xfloatX coordinate of a new Zoom frame float.
yfloatY coordinate of a new Zoom frame float.
widthfloatWidth of a new Zoom frame float.
heightfloatHeight of a new Zoom frame float.
slideISlideThe slide object referenced by the Zoom frame ISlide.
imageIPPImageThe image for the referenced slide IPPImage

Returns: IZoomFrame - Created Zoom object IZoomFrame.

addSectionZoomFrame(float x, float y, float width, float height, ISection section)

public abstract ISectionZoomFrame addSectionZoomFrame(float x, float y, float width, float height, ISection section)

Adds a new Section Zoom object to the end of a 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();
 }

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new Section Zoom frame float.
yfloatY coordinate of a new Section Zoom frame float.
widthfloatWidth of a new Section Zoom frame float.
heightfloatHeight of a new Section Zoom frame float.
sectionISectionThe section object referenced by the Section Zoom frame ISection.

Returns: ISectionZoomFrame - Created Section Zoom object ISectionZoomFrame.

addSectionZoomFrame(float x, float y, float width, float height, ISection section, IPPImage image)

public abstract ISectionZoomFrame addSectionZoomFrame(float x, float y, float width, float height, ISection section, IPPImage image)

Adds a new Section Zoom object to the end of a collection with a predefined image.


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 {
     FileInputStream fos = null;
     try {
         fos = new FileInputStream("image.png");
         IPPImage image = pres.getImages().addImage(fos);
         ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addSectionZoomFrame(150, 20, 50, 50, pres.getSections().get_Item(1), image);
     } finally {
         if (fos != null) fos.close();
     }
 } catch (IOException e) {
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new Section Zoom frame float.
yfloatY coordinate of a new Section Zoom frame float.
widthfloatWidth of a new Section Zoom frame float.
heightfloatHeight of a new Section Zoom frame float.
sectionISectionThe section object referenced by the Section Zoom frame ISection.
imageIPPImageThe image for the referenced slide IPPImage

Returns: ISectionZoomFrame - Created Section Zoom object ISectionZoomFrame.

insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section)

public abstract ISectionZoomFrame insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section)

Creates a new Section Zoom object and inserts into to a 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();
 }

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which Section Zoom frame should be inserted.
xfloatX coordinate of a new Section Zoom frame float.
yfloatY coordinate of a new Section Zoom frame float.
widthfloatWidth of a new Section Zoom frame float.
heightfloatHeight of a new Section Zoom frame float.
sectionISectionThe slide object referenced by the Section Zoom frame ISection.

Returns: ISectionZoomFrame - Created Section Zoom object ISectionZoomFrame.

insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section, IPPImage image)

public abstract ISectionZoomFrame insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section, IPPImage image)

Creates a new Section Zoom object and inserts it to a 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 {
     FileInputStream fos = null;
     try {
         fos = new FileInputStream("image.png");
         IPPImage image = pres.getImages().addImage(fos);
         ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertSectionZoomFrame(2, 150, 20, 50, 50, pres.getSections().get_Item(1), image);
     } finally {
         if (fos != null) fos.close();
     }
 } catch(IOException e) {
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which Section Zoom frame should be inserted.
xfloatX coordinate of a new Section Zoom frame float.
yfloatY coordinate of a new Section Zoom frame float.
widthfloatWidth of a new Section Zoom frame float.
heightfloatHeight of a new Section Zoom frame float.
sectionISectionThe slide object referenced by the Section Zoom frame ISection.
imageIPPImageThe image for the referenced slide IPPImage

Returns: ISectionZoomFrame - Created Section Zoom object ISectionZoomFrame.

addSummaryZoomFrame(float x, float y, float width, float height)

public abstract ISummaryZoomFrame addSummaryZoomFrame(float x, float y, float width, float height)

Adds a new Summary Zoom object to the end of a 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();
 }

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new Section Zoom frame float.
yfloatY coordinate of a new Section Zoom frame float.
widthfloatWidth of a new Section Zoom frame float.
heightfloatHeight of a new Section Zoom frame float.

This method creates a new Summary Zoom and puts a collection of objects into it for all the sections in this presentation. |

Returns: ISummaryZoomFrame - Created Summary Zoom object ISummaryZoomFrame.

insertSummaryZoomFrame(int index, float x, float y, float width, float height)

public abstract ISummaryZoomFrame insertSummaryZoomFrame(int index, float x, float y, float width, float height)

Creates a new Summary Zoom object and inserts it to a 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();
 }

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which Section Zoom frame should be inserted.
xfloatX coordinate of a new Section Zoom frame float.
yfloatY coordinate of a new Section Zoom frame float.
widthfloatWidth of a new Section Zoom frame float.
heightfloatHeight of a new Section Zoom frame float.

This method creates a new Summary Zoom and puts a collection of objects into it for all the sections in this presentation. |

Returns: ISummaryZoomFrame - Created Summary Zoom object ISummaryZoomFrame.

addVideoFrame(float x, float y, float width, float height, String fname)

public abstract IVideoFrame addVideoFrame(float x, float y, float width, float height, String fname)

Adds a new video frame to the end of a collection.

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new video frame.
yfloatY coordinate of a new video frame.
widthfloatWidth of a new video frame.
heightfloatHeight of a new video frame.
fnamejava.lang.StringVideo file name.

Returns: IVideoFrame - Created VideoFrame object.

addVideoFrame(float x, float y, float width, float height, IVideo video)

public abstract IVideoFrame addVideoFrame(float x, float y, float width, float height, IVideo video)

Adds a new video frame to the end of a collection.

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new video frame.
yfloatY coordinate of a new video frame.
widthfloatWidth of a new video frame.
heightfloatHeight of a new video frame.
videoIVideoVideo.

Returns: IVideoFrame - Created VideoFrame object.

insertVideoFrame(int index, float x, float y, float width, float height, String fname)

public abstract IVideoFrame insertVideoFrame(int index, float x, float y, float width, float height, String fname)

Creates a new video frame and inserts it to a collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which video frame should be inserted.
xfloatX coordinate of a new video frame.
yfloatY coordinate of a new video frame.
widthfloatWidth of a new video frame.
heightfloatHeight of a new video frame.
fnamejava.lang.StringVideo file name.

Returns: IVideoFrame - Created VideoFrame object.

addAudioFrameCD(float x, float y, float width, float height)

public abstract IAudioFrame addAudioFrameCD(float x, float y, float width, float height)

Adds an AudioFrame with CD to the end of collection.

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new audio frame.
yfloatY coordinate of a new audio frame.
widthfloatWidth of a new audio frame.
heightfloatHeight of a new audio frame.

Returns: IAudioFrame - Created AudioFrame object.

insertAudioFrameCD(int index, float x, float y, float width, float height)

public abstract IAudioFrame insertAudioFrameCD(int index, float x, float y, float width, float height)

Insert an AudioFrame with CD.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which video frame should be inserted.
xfloatX coordinate of a new audio frame.
yfloatY coordinate of a new audio frame.
widthfloatWidth of a new audio frame.
heightfloatHeight of a new audio frame.

Returns: IAudioFrame - Created AudioFrame object.

addAudioFrameLinked(float x, float y, float width, float height, String fname)

public abstract IAudioFrame addAudioFrameLinked(float x, float y, float width, float height, String fname)

Adds a new audio frame with linked audio file to the end of a collection.

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new audio frame.
yfloatY coordinate of a new audio frame.
widthfloatWidth of a new audio frame.
heightfloatHeight of a new audio frame.
fnamejava.lang.StringAudio file name.

Returns: IAudioFrame - Created AudioFrame object.

insertAudioFrameLinked(int index, float x, float y, float width, float height, String fname)

public abstract IAudioFrame insertAudioFrameLinked(int index, float x, float y, float width, float height, String fname)

Creates a new audio frame with linked audio file and inserts it to a collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which audio frame should be inserted.
xfloatX coordinate of a new audio frame.
yfloatY coordinate of a new audio frame.
widthfloatWidth of a new audio frame.
heightfloatHeight of a new audio frame.
fnamejava.lang.StringAudio file name.

Returns: IAudioFrame - Created AudioFrame object.

addAudioFrameEmbedded(float x, float y, float width, float height, InputStream audio_stream)

public abstract IAudioFrame addAudioFrameEmbedded(float x, float y, float width, float height, InputStream audio_stream)

Adds a new audio frame with embedded audio file to the end of a collection. Embedded audio file can be a WAV only. It adds new audio into Presentation.Audios list.

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new audio frame.
yfloatY coordinate of a new audio frame.
widthfloatWidth of a new audio frame.
heightfloatHeight of a new audio frame.
audio_streamjava.io.InputStreamInout stream with audio data.

Returns: IAudioFrame - Created AudioFrame object.

addAudioFrameEmbedded(float x, float y, float width, float height, IAudio audio)

public abstract IAudioFrame addAudioFrameEmbedded(float x, float y, float width, float height, IAudio audio)

Adds a new audio frame with embedded audio file to the end of a collection. It uses audio file from Presentation.Audios list.

Parameters:

ParameterTypeDescription
xfloatX coordinate of a new audio frame.
yfloatY coordinate of a new audio frame.
widthfloatWidth of a new audio frame.
heightfloatHeight of a new audio frame.
audioIAudioAudio from Presentation.Audios list.

Returns: IAudioFrame - Created AudioFrame object.

insertAudioFrameEmbedded(int index, float x, float y, float width, float height, InputStream audio_stream)

public abstract IAudioFrame insertAudioFrameEmbedded(int index, float x, float y, float width, float height, InputStream audio_stream)

Insert an AudioFrame with embedded audio file. Embedded audio file sound can be a WAV only. It adds new audio into Presentation.Audios list.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
xfloatX coordinate of a new audio frame.
yfloatY coordinate of a new audio frame.
widthfloatWidth of a new audio frame.
heightfloatHeight of a new audio frame.
audio_streamjava.io.InputStreamAudio stream.

Returns: IAudioFrame - Created AudioFrame object.

insertAudioFrameEmbedded(int index, float x, float y, float width, float height, IAudio audio)

public abstract IAudioFrame insertAudioFrameEmbedded(int index, float x, float y, float width, float height, IAudio audio)

Insert an AudioFrame with embedded audio file. It uses audio file from Presentation.Audios list.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
xfloatX coordinate of a new audio frame.
yfloatY coordinate of a new audio frame.
widthfloatWidth of a new audio frame.
heightfloatHeight of a new audio frame.
audioIAudioAudio from Presentation.Audios list.

Returns: IAudioFrame - Created AudioFrame object.

indexOf(IShape shape)

public abstract int indexOf(IShape shape)

Returns the zero-based index of the first occurrence of a shape in the collection.

Parameters:

ParameterTypeDescription
shapeIShapeThe shape to locate in the collection.

Returns: int - The zero-based index of the first occurrence of shape within the collection, if found; otherwise, -1.

toArray()

public abstract IShape[] toArray()

Creates and returns an array with all shapse in it.

Returns: com.aspose.slides.IShape[] - Array of IShape

toArray(int startIndex, int count)

public abstract IShape[] toArray(int startIndex, int count)

Creates and returns an array with all shapes from the specified range in it.

Parameters:

ParameterTypeDescription
startIndexintAn index of a first shape to return.
countintA number of shapes to return.

Returns: com.aspose.slides.IShape[] - Array of IShape

reorder(int index, IShape shape)

public abstract void reorder(int index, IShape shape)

Moves a shape from the collection to the specified position.

Parameters:

ParameterTypeDescription
indexintTarget index.
shapeIShapeShape to move.

reorder(int index, IShape[] shapes)

public abstract void reorder(int index, IShape[] shapes)

Moves shapes from the collection to the specified position. Shapes will be placed starting from index in order they appear in list.

Parameters:

ParameterTypeDescription
indexintTarget index.
shapesIShape[]Shapes to move.

addAutoShape(int shapeType, float x, float y, float width, float height)

public abstract IAutoShape addAutoShape(int shapeType, float x, float y, float width, float height)

Creates a new AutoShape, tunes it from default template and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
shapeTypeintThe ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.

Returns: IAutoShape - Created AutoShape object.

addAutoShape(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)

public abstract IAutoShape addAutoShape(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)

Creates a new AutoShape and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
shapeTypeintThe ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.
createFromTemplatebooleanIf true then new shape will be tuned from default template. Not empty name, simple style, text centered will be assined to the new shape. If false then all values of the properties of the new shape will have default values.

Returns: IAutoShape - Created AutoShape object.

addMathShape(float x, float y, float width, float height)

public abstract IAutoShape addMathShape(float x, float y, float width, float height)

Creates a new AutoShape of the type Rectangle to host mathematical content inside and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.

Returns: IAutoShape - Created AutoShape object.

insertAutoShape(int index, int shapeType, float x, float y, float width, float height)

public abstract IAutoShape insertAutoShape(int index, int shapeType, float x, float y, float width, float height)

Creates a new AutoShape, tunes it from default template and inserts it to the collection at the specified index. Note: the type of the shape will be determined by the shapeType parameter.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
shapeTypeintAn ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.

Returns: IAutoShape - Created AutoShape object.

insertAutoShape(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)

public abstract IAutoShape insertAutoShape(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)

Creates a new AutoShape and inserts it to the collection at the specified index. Note: the type of the shape will be determined by the shapeType parameter.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
shapeTypeintAn ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.
createFromTemplatebooleanIf true then new shape will be tuned from default template. Not empty name, simple style, text centered will be assined to the new shape. If false then all values of the properties of the new shape will have default values.

Returns: IAutoShape - Created AutoShape object.

addGroupShape()

public abstract IGroupShape addGroupShape()

Creates a new GroupShape and adds it to the end of the collection. GroupShape frame size and position will be fitted to content when new shape will be added into the GroupShape.

Returns: IGroupShape - Created GroupShape object.

addGroupShape(ISvgImage svgImage, float x, float y, float width, float height)

public abstract IGroupShape addGroupShape(ISvgImage svgImage, float x, float y, float width, float height)

Creates a new GroupShape, fills it with converted shapes from SVG and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
svgImageISvgImageSvg image object ISvgImage
xfloatThe X coordinate for the left side of the shape group frame.
yfloatThe Y coordinate for the top side of the shape group frame.
widthfloatThe width of the group of the shape group frame.
heightfloatThe height of a group of the shape group frame.

Returns: IGroupShape - Created GroupShape object.

insertGroupShape(int index)

public abstract IGroupShape insertGroupShape(int index)

Creates a new GroupShape and inserts it to the collection at the specified index. GroupShape frame size and position will be fitted to content when new shape will be added into the GroupShape.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.

Returns: IGroupShape - Created GroupShape object.

addConnector(int shapeType, float x, float y, float width, float height)

public abstract IConnector addConnector(int shapeType, float x, float y, float width, float height)

Creates a new Connector, tunes it from default template and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
shapeTypeintThe ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.

Returns: IConnector - The zero-based index of the created shape.

addConnector(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)

public abstract IConnector addConnector(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)

Creates a new Connector and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
shapeTypeintThe ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.
createFromTemplatebooleanIf true then new shape will be tuned from default template. Not empty name, simple style, text centered will be assined to the new shape. If false then all values of the properties of the new shape will have default values.

Returns: IConnector - The zero-based index of the created shape.

insertConnector(int index, int shapeType, float x, float y, float width, float height)

public abstract IConnector insertConnector(int index, int shapeType, float x, float y, float width, float height)

Creates a new Connector, tunes it from default template and inserts it to the collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
shapeTypeintAn ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.

Returns: IConnector - Created Connector object.

insertConnector(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)

public abstract IConnector insertConnector(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)

Creates a new Connector and inserts it to the collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
shapeTypeintAn ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.
createFromTemplatebooleanIf true then new shape will be tuned from default template. Not empty name, simple style, text centered will be assined to the new shape. If false then all values of the properties of the new shape will have default values.

Returns: IConnector - Created Connector object.

addPictureFrame(int shapeType, float x, float y, float width, float height, IPPImage image)

public abstract IPictureFrame addPictureFrame(int shapeType, float x, float y, float width, float height, IPPImage image)

Creates a new PictureFrame and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
shapeTypeintThe shape contained in the set ShapeType of shapes, 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. | | x | float | The X-coordinate for a left side of shape’s frame. | | y | float | The Y-coordinate for a top side of shape’s frame. | | width | float | The width of shape’s frame. | | height | float | The height of shape’s frame. | | image | IPPImage | The image of picture frame. |

Returns: IPictureFrame - Created PictureFrame object.

insertPictureFrame(int index, int shapeType, float x, float y, float width, float height, IPPImage image)

public abstract IPictureFrame insertPictureFrame(int index, int shapeType, float x, float y, float width, float height, IPPImage image)

Creates a new PictureFrame and inserts it to the collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
shapeTypeintThe shape contained in the set ShapeType of shapes, 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. | | x | float | The X-coordinate for a left side of shape’s frame. | | y | float | The Y-coordinate for a top side of shape’s frame. | | width | float | The width of shape’s frame. | | height | float | The height of shape’s frame. | | image | IPPImage | The image of picture frame. |

Returns: IPictureFrame - Created PictureFrame object.

addTable(float x, float y, double[] columnWidths, double[] rowHeights)

public abstract ITable addTable(float x, float y, double[] columnWidths, double[] rowHeights)

Creates a new Table and adds it to the end of the collection.

Parameters:

ParameterTypeDescription
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
columnWidthsdouble[]Array of doubles which represents widths of columns in the table.
rowHeightsdouble[]Array of doubles which represents heights of rows in the table.

Returns: ITable - Created Table object.

insertTable(int index, float x, float y, double[] columnWidths, double[] rowHeights)

public abstract ITable insertTable(int index, float x, float y, double[] columnWidths, double[] rowHeights)

Creates a new Table and inserts it to the collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
columnWidthsdouble[]Array of doubles which represents widths of columns in the table.
rowHeightsdouble[]Array of doubles which represents heights of rows in the table.

Returns: ITable - Created Table object.

removeAt(int index)

public abstract void removeAt(int index)

Removes the element at the specified index of the collection.

Parameters:

ParameterTypeDescription
indexintThe zero-based index of the element to remove.

remove(IShape shape)

public abstract void remove(IShape shape)

Removes the first occurrence of a specific shape from the collection.

Parameters:

ParameterTypeDescription
shapeIShapeThe shape to remove from the collection.

clear()

public abstract void clear()

Removes all shapes from the collection.

addClone(IShape sourceShape, float x, float y, float width, float height)

public abstract IShape addClone(IShape sourceShape, float x, float y, float width, float height)

Adds a copy of a specified shape to the end of the collection.

Parameters:

ParameterTypeDescription
sourceShapeIShapeShape to clone.
xfloatX coordinate of a new shape.
yfloatY coordinate of a new shape.
widthfloatWidth of a new shape.
heightfloatHeight of a new shape.

Returns: IShape - New shape.

addClone(IShape sourceShape, float x, float y)

public abstract IShape addClone(IShape sourceShape, float x, float y)

Adds a copy of a specified shape to the end of the collection. Width and Height of the new shape are equal to Width and Height of the source Shape.

Parameters:

ParameterTypeDescription
sourceShapeIShapeShape to clone.
xfloatX coordinate of a new shape.
yfloatY coordinate of a new shape.

Returns: IShape - New shape.

addClone(IShape sourceShape)

public abstract IShape addClone(IShape sourceShape)

Adds a copy of a specified shape to the end of the collection. X, Y, Width and Height of the new shape are equal to X, Y, Width and Height of the source Shape.

Parameters:

ParameterTypeDescription
sourceShapeIShapeShape to clone.

Returns: IShape - New shape.

insertClone(int index, IShape sourceShape, float x, float y, float width, float height)

public abstract IShape insertClone(int index, IShape sourceShape, float x, float y, float width, float height)

Inserts a copy of a specified shape to specified position of the collection.

Parameters:

ParameterTypeDescription
indexintIndex of new shape.
sourceShapeIShapeShape to clone.
xfloatX coordinate of a new shape.
yfloatY coordinate of a new shape.
widthfloatWidth of a new shape.
heightfloatHeight of a new shape.

Returns: IShape - Inserted shape.

insertClone(int index, IShape sourceShape, float x, float y)

public abstract IShape insertClone(int index, IShape sourceShape, float x, float y)

Inserts a copy of a specified shape to specified position of the collection. Width and Height of the new shape are equal to Width and Height of the source Shape.

Parameters:

ParameterTypeDescription
indexintIndex of new shape.
sourceShapeIShapeShape to clone.
xfloatX coordinate of a new shape.
yfloatY coordinate of a new shape.

Returns: IShape - Inserted shape.

insertClone(int index, IShape sourceShape)

public abstract IShape insertClone(int index, IShape sourceShape)

Inserts a copy of a specified shape to specified position of the collection. X, Y, Width and Height of the new shape are equal to X, Y, Width and Height of the source Shape.

Parameters:

ParameterTypeDescription
indexintIndex of new shape.
sourceShapeIShapeShape to clone.

Returns: IShape - Inserted shape.