InsertZoomFrame
内容
[
隐藏
]InsertZoomFrame(int, float, float, float, float, ISlide)
创建一个新的 Zoom 对象并将其插入到指定索引的集合中。
public IZoomFrame InsertZoomFrame(int index, float x, float y, float width, float height,
ISlide slide)
| 参数 | 类型 | 描述 |
|---|---|---|
| index | Int32 | Zoom 帧应该插入的零基索引。 |
| x | Single | 新 Zoom 帧的 X 坐标。 |
| y | Single | 新 Zoom 帧的 Y 坐标。 |
| width | Single | 新 Zoom 帧的宽度。 |
| height | Single | 新 Zoom 帧的高度。 |
| slide | ISlide | Zoom 帧所引用的幻灯片对象 ISlide。 |
返回值
创建的 Zoom 对象 IZoomFrame。
异常
| 异常 | 条件 |
|---|---|
| ArgumentException | 引用的幻灯片不属于当前演示文稿。 |
示例
此示例演示在集合的指定索引处创建和插入一个 Zoom 对象(假设在 “Presentation.pptx” 演示文稿中至少有两张幻灯片):
[C#]
using (Presentation pres = new Presentation("Presentation.pptx"))
{
IZoomFrame zoomFrame = pres.Slides[0].Shapes.InsertZoomFrame(2, 150, 20, 50, 50, pres.Slides[1]);
}
另见
- 接口 IZoomFrame
- 接口 ISlide
- 类 ShapeCollection
- 命名空间 Aspose.Slides
- 程序集 Aspose.Slides
InsertZoomFrame(int, float, float, float, float, ISlide, IPPImage)
创建一个新的 Zoom 对象并将其插入到指定索引的集合中。
public IZoomFrame InsertZoomFrame(int index, float x, float y, float width, float height,
ISlide slide, IPPImage image)
| 参数 | 类型 | 描述 |
|---|---|---|
| index | Int32 | Zoom 帧应该插入的零基索引。 |
| x | Single | 新 Zoom 帧的 X 坐标。 |
| y | Single | 新 Zoom 帧的 Y 坐标。 |
| width | Single | 新 Zoom 帧的宽度。 |
| height | Single | 新 Zoom 帧的高度。 |
| slide | ISlide | Zoom 帧所引用的幻灯片对象 ISlide。 |
| image | IPPImage | 引用幻灯片的图像 IPPImage |
返回值
创建的 Zoom 对象 IZoomFrame。
异常
| 异常 | 条件 |
|---|---|
| ArgumentException | 引用的幻灯片不属于当前演示文稿。 |
示例
此示例演示在集合的指定索引处创建和插入一个 Zoom 对象(假设在 “Presentation.pptx” 演示文稿中至少有两张幻灯片):
[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);
}
另见
- 接口 IZoomFrame
- 接口 ISlide
- 接口 IPPImage
- 类 ShapeCollection
- 命名空间 Aspose.Slides
- 程序集 Aspose.Slides