SetGeometryPaths

GeometryShape.SetGeometryPaths метод

Обновляет геометрию фигуры из массива 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);
}

См. также