IShapeCollectionInsertZoomFrame Method (Int32, Single, Single, Single, Single, ISlide, IPPImage)

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

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 21.11.0.0 (21.11)
Syntax
IZoomFrame InsertZoomFrame(
	int index,
	float x,
	float y,
	float width,
	float height,
	ISlide slide,
	IPPImage image
)

Parameters

index
Type: SystemInt32
The zero-based index at which Zoom frame should be inserted.
x
Type: SystemSingle
X coordinate of a new Zoom frame Single.
y
Type: SystemSingle
Y coordinate of a new Zoom frame Single.
width
Type: SystemSingle
Width of a new Zoom frame Single.
height
Type: SystemSingle
Height of a new Zoom frame Single.
slide
Type: Aspose.SlidesISlide
The slide object referenced by the Zoom frame ISlide.
image
Type: Aspose.SlidesIPPImage
The image for the referenced slide IPPImage

Return Value

Type: IZoomFrame
Created Zoom object IZoomFrame.
Exceptions
ExceptionCondition
ArgumentExceptionReferenced slide does not belong to the current presentation.
Examples
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):
[C#]
using (Presentation pres = new Presentation("Presentation.pptx"))
{
    IPPImage image = pres.Images.AddImage(Image.FromFile("image.png"));
    IZoomFrame zoomFrame = pres.Slides[0].Shapes.InsertZoomFrame(2, 150, 20, 50, 50, pres.Slides[1], image);
}
See Also