InsertSectionZoomFrame

InsertSectionZoomFrame(int, float, float, float, float, ISection)

创建一个新的节缩放对象并将其插入到指定索引的集合中。

public ISectionZoomFrame InsertSectionZoomFrame(int index, float x, float y, float width, 
    float height, ISection section)
参数类型描述
indexInt32应插入节缩放框架的零基索引.
xSingle新节缩放框架的 X 坐标.
ySingle新节缩放框架的 Y 坐标.
widthSingle新节缩放框架的宽度.
heightSingle新节缩放框架的高度.
sectionISection节缩放框架引用的幻灯片对象 ISection.

返回值

创建的节缩放对象 ISectionZoomFrame.

异常

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

示例

本示例演示了在集合的指定索引处创建并插入节缩放对象(假设在“Presentation.pptx”演示文稿中至少有两个节):

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

另请参阅


InsertSectionZoomFrame(int, float, float, float, float, ISection, IPPImage)

创建一个新的节缩放对象并将其插入到指定索引的集合中。

public ISectionZoomFrame InsertSectionZoomFrame(int index, float x, float y, float width, 
    float height, ISection section, IPPImage image)
参数类型描述
indexInt32应插入节缩放框架的零基索引.
xSingle新节缩放框架的 X 坐标.
ySingle新节缩放框架的 Y 坐标.
widthSingle新节缩放框架的宽度.
heightSingle新节缩放框架的高度.
sectionISection节缩放框架引用的幻灯片对象 ISection.
imageIPPImage引用幻灯片的图像 IPPImage

返回值

创建的节缩放对象 ISectionZoomFrame.

异常

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

示例

本示例演示了在集合的指定索引处创建并插入节缩放对象(假设在“Presentation.pptx”演示文稿中至少有两个节):

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

另请参阅