ShapeGeometry.GetPath (Método) (RectangleD)

obtiene la ruta alrededor de la geometría de la forma.

Espacio de nombres:  Microsoft.VisualStudio.Modeling.Diagrams
Ensamblado:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (en Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)

Sintaxis

'Declaración
Protected Overridable Function GetPath ( _
    boundingBox As RectangleD _
) As GraphicsPath
protected virtual GraphicsPath GetPath(
    RectangleD boundingBox
)

Parámetros

Valor devuelto

Tipo: System.Drawing.Drawing2D.GraphicsPath
la ruta alrededor de la geometría de la forma.

Comentarios

Esta propiedad devuelve una referencia a la ruta de acceso utilizada por esta geometría.No se elimina.Utilizar la ruta antes de utilizar GetPath() de nuevo.Si necesita una copia, utilice el GetPathCopy.

Ejemplos

Este ejemplo es para una forma circular.Observe que UninitializedPath se utiliza y restaurado.

/// <summary>
/// Gets the GraphicsPath of the geometry.
/// Returns a reference to the path - do not dispose it.
/// </summary>
/// <param name="boundingBox">The bounding box of the shape.</param>
/// <returns>The GraphicsPath of the geometry.</returns>
protected override GraphicsPath GetPath(RectangleD boundingBox)
{
GraphicsPath path = UninitializedPath;
path.Reset();

path.AddEllipse((float)boundingBox.X, (float)boundingBox.Y, (float)boundingBox.Width, (float)boundingBox.Height);
return path;
}

Seguridad de .NET Framework

Vea también

Referencia

ShapeGeometry Clase

GetPath (Sobrecarga)

Microsoft.VisualStudio.Modeling.Diagrams (Espacio de nombres)