SetGeometryPaths
IGeometryShape.SetGeometryPaths method
从IGeometryPath
数组更新形状几何。坐标必须相对于形状的左 上角。 将形状的类型(ShapeType
)更改为Custom.
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
- interface IGeometryShape
- 命名空间 Aspose.Slides
- 部件 Aspose.Slides