SetGeometryPaths

IGeometryShape.SetGeometryPaths method

IGeometryPath数组更新形状几何。坐标必须相对于形状的左 上角。 将形状的类型(ShapeType)更改为Custom.

public void SetGeometryPaths(IGeometryPath[] geometryPaths)
范围类型描述
geometryPathsIGeometryPath[]数组几何路径

例外

例外(健康)状况
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);
}

也可以看看