SetGeometryPaths
IGeometryShape.SetGeometryPaths 方法
从 IGeometryPath
数组更新形状几何。坐标必须相对于形状的左上角。将形状的类型(ShapeType
)更改为自定义。
public void SetGeometryPaths(IGeometryPath[] geometryPaths)
参数 | 类型 | 描述 |
---|---|---|
geometryPaths | IGeometryPath[] | 几何路径数组 |
异常
异常 | 条件 |
---|---|
ArgumentException | 未找到路径 |
ArgumentException | 路径为空 |
示例
示例:
[C#]
using (Presentation pres = new Presentation())
{
GeometryShape shape = pres.Slides[0].Shapes.AddAutoShape(ShapeType.Rectangle, 100, 100, 200, 100) as GeometryShape;
GeometryPath geometryPath = shape.GetGeometryPaths()[0];
geometryPath.LineTo(100, 50, 1);
geometryPath.LineTo(100, 50, 4);
shape.SetGeometryPath(geometryPath);
pres.Save("output.pptx", SaveFormat.Pptx);
}
另见
- 接口 IGeometryPath
- 接口 IGeometryShape
- 命名空间 Aspose.Slides
- 程序集 Aspose.Slides