다음을 통해 공유


ShapeGeometry.GetPath 메서드 (RectangleD)

모양 기하 도형 주위의 경로를 가져옵니다.

네임스페이스:  Microsoft.VisualStudio.Modeling.Diagrams
어셈블리:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0(Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

구문

‘선언
Protected Overridable Function GetPath ( _
    boundingBox As RectangleD _
) As GraphicsPath
protected virtual GraphicsPath GetPath(
    RectangleD boundingBox
)

매개 변수

반환 값

형식: System.Drawing.Drawing2D.GraphicsPath
모양 기하 도형 주위의 경로입니다.

설명

이 이때가이 형상에 의해 사용 되는 경로에 대 한 참조를 반환 합니다. 그 삭제 하지 마십시오. 경로 사용 하 여 사용 하기 전에 GetPath() 다시. 사용 하 여 복사본을 필요한 경우 GetPathCopy.

예제

원형 도형에 대 한이 예제가입니다. 해당 UninitializedPath 사용 되 고 다시 설정 합니다.

/// <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;
}

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

ShapeGeometry 클래스

GetPath 오버로드

Microsoft.VisualStudio.Modeling.Diagrams 네임스페이스