Graphics.FillPath(Brush, GraphicsPath) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
GraphicsPath의 내부를 채웁니다.
public:
void FillPath(System::Drawing::Brush ^ brush, System::Drawing::Drawing2D::GraphicsPath ^ path);
public void FillPath (System.Drawing.Brush brush, System.Drawing.Drawing2D.GraphicsPath path);
member this.FillPath : System.Drawing.Brush * System.Drawing.Drawing2D.GraphicsPath -> unit
Public Sub FillPath (brush As Brush, path As GraphicsPath)
매개 변수
- path
- GraphicsPath
채울 경로를 나타내는 GraphicsPath입니다.
예외
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
단색 빨간색 브러시를 만듭니다.
그래픽 경로 개체를 만듭니다.
그래픽 경로에 타원을 추가합니다.
화면의 경로를 채웁니다.
public:
void FillPathEllipse( PaintEventArgs^ e )
{
// Create solid brush.
SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );
// Create graphics path object and add ellipse.
GraphicsPath^ graphPath = gcnew GraphicsPath;
graphPath->AddEllipse( 0, 0, 200, 100 );
// Fill graphics path to screen.
e->Graphics->FillPath( redBrush, graphPath );
}
public void FillPathEllipse(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create graphics path object and add ellipse.
GraphicsPath graphPath = new GraphicsPath();
graphPath.AddEllipse(0, 0, 200, 100);
// Fill graphics path to screen.
e.Graphics.FillPath(redBrush, graphPath);
}
Public Sub FillPathEllipse(ByVal e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
' Create graphics path object and add ellipse.
Dim graphPath As New GraphicsPath
graphPath.AddEllipse(0, 0, 200, 100)
' Fill graphics path to screen.
e.Graphics.FillPath(redBrush, graphPath)
End Sub
설명
는 GraphicsPath 일련의 선 및 곡선 세그먼트로 구성됩니다. 매개 변수가 path
나타내는 경로가 닫혀 있지 않으면 마지막 지점에서 첫 번째 지점까지 추가 세그먼트가 추가되어 경로를 닫습니다.
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기