AddSectionZoomFrame

AddSectionZoomFrame(float, float, float, float, ISection)

将新的 Section Zoom 对象添加到集合的末尾。

public ISectionZoomFrame AddSectionZoomFrame(float x, float y, float width, float height, 
    ISection section)
参数类型描述
xSingle新的 Section Zoom 帧的 X 坐标。
ySingle新的 Section Zoom 帧的 Y 坐标。
widthSingle新的 Section Zoom 帧的宽度。
heightSingle新的 Section Zoom 帧的高度。
sectionISectionSection Zoom 帧引用的 section 对象 ISection

返回值

创建的 Section Zoom 对象 ISectionZoomFrame

异常

异常条件
ArgumentException引用的 section 不属于当前演示文稿或不包含任何幻灯片。

示例

此示例演示了如何将 Section Zoom 对象添加到集合的末尾(假设 “Presentation.pptx” 演示文稿中至少有两个 section):

[C#]
using (Presentation pres = new Presentation("Presentation.pptx"))
{
    ISectionZoomFrame zoomFrame = pres.Slides[0].Shapes.AddSectionZoomFrame(150, 20, 50, 50, pres.Sections[1]);
}

另请参见


AddSectionZoomFrame(float, float, float, float, ISection, IPPImage)

将新的 Section Zoom 对象添加到集合的末尾,并带有预定义图像。

public ISectionZoomFrame AddSectionZoomFrame(float x, float y, float width, float height, 
    ISection section, IPPImage image)
参数类型描述
xSingle新的 Section Zoom 帧的 X 坐标。
ySingle新的 Section Zoom 帧的 Y 坐标。
widthSingle新的 Section Zoom 帧的宽度。
heightSingle新的 Section Zoom 帧的高度。
sectionISectionSection Zoom 帧引用的 section 对象 ISection
imageIPPImage引用幻灯片的图像 IPPImage

返回值

创建的 Section Zoom 对象 ISectionZoomFrame

异常

异常条件
ArgumentException引用的 section 不属于当前演示文稿或不包含任何幻灯片。

示例

此示例演示了如何将 Section Zoom 对象添加到集合的末尾(假设 “Presentation.pptx” 演示文稿中至少有两个 section):

[C#]
using (Presentation pres = new Presentation("Presentation.pptx"))
{
    IPPImage image = pres.Images.AddImage(Image.FromFile("image.png"));
    ISectionZoomFrame zoomFrame = pres.Slides[0].Shapes.AddSectionZoomFrame(150, 20, 50, 50, pres.Sections[1], image);
}

另请参见