添加缩放框
内容
[
隐藏
]添加缩放框(float, float, float, float, ISlide)
将新的缩放对象添加到集合的末尾。
public IZoomFrame AddZoomFrame(float x, float y, float width, float height, ISlide slide)
参数 | 类型 | 描述 |
---|---|---|
x | Single | 新缩放框的X坐标Single。 |
y | Single | 新缩放框的Y坐标Single。 |
width | Single | 新缩放框的宽度Single。 |
height | Single | 新缩放框的高度Single。 |
slide | ISlide | 被缩放框引用的幻灯片对象 ISlide 。 |
返回值
创建的缩放对象 IZoomFrame
。
异常
异常 | 条件 |
---|---|
ArgumentException | 引用的幻灯片不属于当前演示文稿。 |
示例
以下示例演示了如何将缩放对象添加到集合的末尾(假设“Presentation.pptx”演示文稿中至少有两张幻灯片):
[C#]
using (Presentation pres = new Presentation("Presentation.pptx"))
{
IZoomFrame zoomFrame = pres.Slides[0].Shapes.AddZoomFrame(150, 20, 50, 50, pres.Slides[1]);
}
另见
- 接口 IZoomFrame
- 接口 ISlide
- 类 ShapeCollection
- 命名空间 Aspose.Slides
- 程序集 Aspose.Slides
添加缩放框(float, float, float, float, ISlide, IPPImage)
将新的缩放对象添加到集合的末尾。
public IZoomFrame AddZoomFrame(float x, float y, float width, float height, ISlide slide,
IPPImage image)
参数 | 类型 | 描述 |
---|---|---|
x | Single | 新缩放框的X坐标Single。 |
y | Single | 新缩放框的Y坐标Single。 |
width | Single | 新缩放框的宽度Single。 |
height | Single | 新缩放框的高度Single。 |
slide | ISlide | 被缩放框引用的幻灯片对象 ISlide 。 |
image | IPPImage | 被引用幻灯片的图像 IPPImage |
返回值
创建的缩放对象 IZoomFrame
。
异常
异常 | 条件 |
---|---|
ArgumentException | 引用的幻灯片不属于当前演示文稿。 |
示例
以下示例演示了如何将缩放对象添加到集合的末尾(假设“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.AddZoomFrame(150, 20, 50, 50, pres.Slides[1], image);
}
另见
- 接口 IZoomFrame
- 接口 ISlide
- 接口 IPPImage
- 类 ShapeCollection
- 命名空间 Aspose.Slides
- 程序集 Aspose.Slides