SetGeometryPaths

GeometryShape.SetGeometryPaths méthode

Met à jour la géométrie de la forme à partir d’un tableau de IGeometryPath. Les coordonnées doivent être relatives au coin supérieur gauche de la forme. Change le type de la forme (ShapeType) en Personnalisé.

public void SetGeometryPaths(IGeometryPath[] geometryPaths)
ParamètreTypeDescription
geometryPathsIGeometryPath[]Tableau des chemins de géométrie

Exceptions

exceptioncondition
ArgumentExceptionAucun chemin trouvé
ArgumentExceptionChemin vide

Exemples

Exemple:

[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);
}

Voir Aussi