SetGeometryPaths

GeometryShape.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);
}

Смотрите также