ShapeCollection

ShapeCollection

概述

ShapeCollection 是 Aspose.Slides FOSS 中用于 .NET 的类。继承自:IShapeCollection。

表示属于幻灯片或组形状的有序、可变的 IShape 对象集合。

此类提供 22 个方法,用于在 .NET 程序中处理 ShapeCollection 对象。可用的方法包括:AddAutoShape、AddConnector、AddPictureFrame、AddTable、Clear、GetEnumerator、IndexOf、InsertAutoShape、InsertConnector、InsertPictureFrame、InsertTable、Remove,以及另外 4 个方法。安装 Aspose.Slides FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:AsICollection、AsIEnumerable、Count、ParentGroup。

属性

名称类型访问描述
ParentGroupIGroupShape?读取获取父组。
AsICollectionIList<IShape>读取获取 as i 集合。
AsIEnumerableIEnumerable<IShape>读取获取作为 IEnumerable 的.
Countint读取获取计数。

方法

签名描述
ShapeCollection()初始化 ShapeCollection 类的一个新实例。
ToArray()返回从 startIndex 开始的形状子数组
ToArray(startIndex: int, count: int)在此 ShapeCollection 实例上调用 ToArray(startIndex, count)。
Reorder(index: int, shape: IShape)将多个形状移动到给定索引处开始
Reorder(index: int, shapes: IShape[])在此 ShapeCollection 实例上调用 Reorder(index, shapes)。
AddAutoShape(shapeType: ShapeType, x: float, y: float, width: float, height: float)在指定坐标处创建一个请求的 ShapeType 的新 AutoShape,并返回该形状实例
AddAutoShape(shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool)在此 ShapeCollection 实例上调用 AddAutoShape(shapeType, x, y, width, height, createFromTemplate)。
InsertAutoShape(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float)在索引处插入一个新的 AutoShape,可选地来自模板
InsertAutoShape(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool)在此 ShapeCollection 实例上调用 InsertAutoShape(index, shapeType, x, y, width, height, createFromTemplate)。
AddConnector(shapeType: ShapeType, x: float, y: float, width: float, height: float)添加一个连接器,可选地使用模板
AddConnector(shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool)在此 ShapeCollection 实例上调用 AddConnector(shapeType, x, y, width, height, createFromTemplate)。
InsertConnector(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float)在给定索引处插入一个连接器
InsertConnector(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool)在此 ShapeCollection 实例上调用 InsertConnector(index, shapeType, x, y, width, height, createFromTemplate)。
AddPictureFrame(shapeType: ShapeType, x: float, y: float, width: float, height: float, image: IPPImage)添加一个带有提供的图像的图片框
InsertPictureFrame(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, image: IPPImage)在 index 位置插入一个带有提供的图像的图片框
AddTable(x: float, y: float, columnWidths: double[], rowHeights: double[])在 position 处添加一个表格,指定列宽和行高
InsertTable(index: int, x: float, y: float, columnWidths: double[], rowHeights: double[])在给定索引处插入具有指定尺寸的表格
IndexOf(shape: IShape)返回指定形状的零基索引
RemoveAt(index: int)删除给定索引处的形状
Remove(shape: IShape)从集合中删除指定的形状
Clear()在此 ShapeCollection 实例上调用 Clear。
GetEnumerator()返回一个用于遍历形状的枚举器

另请参阅

 中文