ShapeGeometry.GetPath 메서드
보호된 멤버 포함
상속된 멤버 포함
셰이프 기 하 도형 중심의 경로 가져옵니다.반환 된 경로 사용 하 여 적용 하기 전에 GetPath() 다른 도형입니다.사용 GetPathCopy() 경로 유지 하려는 경우.
이 멤버는 오버로드됩니다. 구문, 사용법 및 예제를 비롯하여 이 멤버에 대한 자세한 내용을 보려면 오버로드 목록에서 이름을 클릭합니다.
오버로드 목록
이름 | 설명 | |
---|---|---|
GetPath(IGeometryHost) | 셰이프 기 하 도형 중심의 경로 가져옵니다.반환 된 경로 사용 하 여 적용 하기 전에 GetPath() 다른 도형입니다.사용 GetPathCopy() 경로 유지 하려는 경우. | |
GetPath(RectangleD) | 셰이프 기 하 도형 중심의 경로 가져옵니다. |
위쪽
예제
이 예제에 대 한 원형 모양입니다.알 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;
}