SetGeometryPaths
GeometryShape.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);
}
另请参阅
- interface IGeometryPath
- class GeometryShape
- namespace Aspose.Slides
- assembly Aspose.Slides