AddOnlineImagePlaceholder

LayoutPlaceholderManager.AddOnlineImagePlaceholder 方法

向布局幻灯片添加一个新的占位符形状以保存在线图像。

public IAutoShape AddOnlineImagePlaceholder(float x, float y, float width, float height)
参数类型描述
xSingle新占位符形状的 X 坐标。
ySingle新占位符形状的 Y 坐标。
widthSingle新占位符形状的宽度。
heightSingle新占位符形状的高度。

返回值

创建的 IAutoShape 具有在线图像占位符。

示例

以下示例演示如何将在线图像占位符形状添加到布局幻灯片中。

[C#]
using (Presentation pres = new Presentation())
{
	ILayoutSlide layout = pres.LayoutSlides.GetByType(SlideLayoutType.Blank);
	IAutoShape placeholder = layout.PlaceholderManager.AddOnlineImagePlaceholder(20, 20, 200, 200);
}

另见