Graphics.SetClip 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
SetClip(Region, CombineMode) |
현재 클립 영역과 지정된 Graphics를 결합하는 지정된 작업의 결과로 이 Region의 클립 영역을 설정합니다. |
SetClip(RectangleF, CombineMode) |
현재 클립 영역과 Graphics 구조체에 의해 지정된 사각형을 결합하는 지정된 작업의 결과로 이 RectangleF의 클립 영역을 설정합니다. |
SetClip(Rectangle, CombineMode) |
현재 클립 영역과 Graphics 구조체에 의해 지정된 사각형을 결합하는 지정된 작업의 결과로 이 Rectangle의 클립 영역을 설정합니다. |
SetClip(Graphics, CombineMode) |
현재 클립 영역과 지정된 Graphics의 Clip 속성의 지정된 결합 작업의 결과로 이 Graphics의 클립 영역을 설정합니다. |
SetClip(RectangleF) |
이 Graphics의 클립 영역을 RectangleF 구조체에 의해 지정된 사각형으로 설정합니다. |
SetClip(Rectangle) | |
SetClip(Graphics) | |
SetClip(GraphicsPath) |
이 Graphics의 클립 영역을 지정된 GraphicsPath로 설정합니다. |
SetClip(GraphicsPath, CombineMode) |
현재 클립 영역과 지정된 Graphics를 결합하는 지정된 작업의 결과로 이 GraphicsPath의 클립 영역을 설정합니다. |
SetClip(Region, CombineMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void SetClip(System::Drawing::Region ^ region, System::Drawing::Drawing2D::CombineMode combineMode);
public void SetClip (System.Drawing.Region region, System.Drawing.Drawing2D.CombineMode combineMode);
member this.SetClip : System.Drawing.Region * System.Drawing.Drawing2D.CombineMode -> unit
Public Sub SetClip (region As Region, combineMode As CombineMode)
매개 변수
- combineMode
- CombineMode
사용할 결합 작업을 지정하는 CombineMode 열거형의 멤버입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
클리핑 영역에 대한 작은 사각형을 만듭니다.
멤버를 사용하여 클리핑 영역을 사각형으로 Replace 설정합니다.
큰 사각형을 단색 검은색 브러시로 채웁니다.
그 결과 작고 채워진 검은색 사각형이 생성됩니다.
public:
void SetClipRegionCombine( PaintEventArgs^ e )
{
// Create region for clipping.
System::Drawing::Region^ clipRegion = gcnew System::Drawing::Region( Rectangle(0,0,100,100) );
// Set clipping region of graphics to region.
e->Graphics->SetClip( clipRegion, CombineMode::Replace );
// Fill rectangle to demonstrate clip region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
}
private void SetClipRegionCombine(PaintEventArgs e)
{
// Create region for clipping.
Region clipRegion = new Region(new Rectangle(0, 0, 100, 100));
// Set clipping region of graphics to region.
e.Graphics.SetClip(clipRegion, CombineMode.Replace);
// Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
}
Private Sub SetClipRegionCombine(ByVal e As PaintEventArgs)
' Create region for clipping.
Dim clipRegion As New [Region](New Rectangle(0, 0, 100, 100))
' Set clipping region of graphics to region.
e.Graphics.SetClip(clipRegion, CombineMode.Replace)
' Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
End Sub
적용 대상
SetClip(RectangleF, CombineMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
현재 클립 영역과 Graphics 구조체에 의해 지정된 사각형을 결합하는 지정된 작업의 결과로 이 RectangleF의 클립 영역을 설정합니다.
public:
void SetClip(System::Drawing::RectangleF rect, System::Drawing::Drawing2D::CombineMode combineMode);
public void SetClip (System.Drawing.RectangleF rect, System.Drawing.Drawing2D.CombineMode combineMode);
member this.SetClip : System.Drawing.RectangleF * System.Drawing.Drawing2D.CombineMode -> unit
Public Sub SetClip (rect As RectangleF, combineMode As CombineMode)
매개 변수
- rect
- RectangleF
결합할 RectangleF 구조체입니다.
- combineMode
- CombineMode
사용할 결합 작업을 지정하는 CombineMode 열거형의 멤버입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
클리핑 영역에 대한 작은 사각형을 만듭니다.
멤버를 사용하여 클리핑 영역을 사각형으로 Replace 설정합니다.
큰 사각형을 단색 검은색 브러시로 채웁니다.
그 결과 작고 채워진 검은색 사각형이 생성됩니다.
public:
void SetClipRectangleFCombine( PaintEventArgs^ e )
{
// Create rectangle for clipping region.
RectangleF clipRect = RectangleF(0.0F,0.0F,100.0F,100.0F);
// Set clipping region of graphics to rectangle.
e->Graphics->SetClip( clipRect, CombineMode::Replace );
// Fill rectangle to demonstrate clip region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
}
private void SetClipRectangleFCombine(PaintEventArgs e)
{
// Create rectangle for clipping region.
RectangleF clipRect = new RectangleF(0.0F, 0.0F, 100.0F, 100.0F);
// Set clipping region of graphics to rectangle.
e.Graphics.SetClip(clipRect, CombineMode.Replace);
// Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
}
Private Sub SetClipRectangleFCombine(ByVal e As PaintEventArgs)
' Create rectangle for clipping region.
Dim clipRect As New RectangleF(0.0F, 0.0F, 100.0F, 100.0F)
' Set clipping region of graphics to rectangle.
e.Graphics.SetClip(clipRect, CombineMode.Replace)
' Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
End Sub
적용 대상
SetClip(Rectangle, CombineMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void SetClip(System::Drawing::Rectangle rect, System::Drawing::Drawing2D::CombineMode combineMode);
public void SetClip (System.Drawing.Rectangle rect, System.Drawing.Drawing2D.CombineMode combineMode);
member this.SetClip : System.Drawing.Rectangle * System.Drawing.Drawing2D.CombineMode -> unit
Public Sub SetClip (rect As Rectangle, combineMode As CombineMode)
매개 변수
- combineMode
- CombineMode
사용할 결합 작업을 지정하는 CombineMode 열거형의 멤버입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
클리핑 영역에 대한 작은 사각형을 만듭니다.
멤버를 사용하여 클리핑 영역을 사각형으로 Replace 설정합니다.
큰 사각형을 단색 검은색 브러시로 채웁니다.
그 결과 작고 채워진 검은색 사각형이 생성됩니다.
public:
void SetClipRectangleCombine( PaintEventArgs^ e )
{
// Create rectangle for clipping region.
Rectangle clipRect = Rectangle(0,0,100,100);
// Set clipping region of graphics to rectangle.
e->Graphics->SetClip( clipRect, CombineMode::Replace );
// Fill rectangle to demonstrate clip region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
}
private void SetClipRectangleCombine(PaintEventArgs e)
{
// Create rectangle for clipping region.
Rectangle clipRect = new Rectangle(0, 0, 100, 100);
// Set clipping region of graphics to rectangle.
e.Graphics.SetClip(clipRect, CombineMode.Replace);
// Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
}
Private Sub SetClipRectangleCombine(ByVal e As PaintEventArgs)
' Create rectangle for clipping region.
Dim clipRect As New Rectangle(0, 0, 100, 100)
' Set clipping region of graphics to rectangle.
e.Graphics.SetClip(clipRect, CombineMode.Replace)
' Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
End Sub
적용 대상
SetClip(Graphics, CombineMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void SetClip(System::Drawing::Graphics ^ g, System::Drawing::Drawing2D::CombineMode combineMode);
public void SetClip (System.Drawing.Graphics g, System.Drawing.Drawing2D.CombineMode combineMode);
member this.SetClip : System.Drawing.Graphics * System.Drawing.Drawing2D.CombineMode -> unit
Public Sub SetClip (g As Graphics, combineMode As CombineMode)
매개 변수
- combineMode
- CombineMode
사용할 결합 작업을 지정하는 CombineMode 열거형의 멤버입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며, 이벤트 처리기의 매개 변수인 와 예제의 Paint 가 Form 필요합니다PaintEventArgse
.thisForm
코드는 다음 작업을 수행합니다.
임시 Graphics 의 클리핑 영역을 작은 사각형으로 설정합니다.
폼 그래픽 개체의 클리핑 영역을 멤버를 사용하여 새 Graphics 의 클리핑 영역으로 Replace 업데이트.
큰 사각형을 단색 검은색 브러시로 채웁니다.
그 결과 작고 채워진 검은색 사각형이 생성됩니다.
public:
void SetClipGraphicsCombine( PaintEventArgs^ e )
{
// Create temporary graphics object and set its clipping region.
Graphics^ newGraphics = this->CreateGraphics();
newGraphics->SetClip( Rectangle(0,0,100,100) );
// Update clipping region of graphics to clipping region of new
// graphics.
e->Graphics->SetClip( newGraphics, CombineMode::Replace );
// Fill rectangle to demonstrate clip region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
// Release new graphics.
delete newGraphics;
}
private void SetClipGraphicsCombine(PaintEventArgs e)
{
// Create temporary graphics object and set its clipping region.
Graphics newGraphics = this.CreateGraphics();
newGraphics.SetClip(new Rectangle(0, 0, 100, 100));
// Update clipping region of graphics to clipping region of new
// graphics.
e.Graphics.SetClip(newGraphics, CombineMode.Replace);
// Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
// Release new graphics.
newGraphics.Dispose();
}
Private Sub SetClipGraphicsCombine(ByVal e As PaintEventArgs)
' Create temporary graphics object and set its clipping region.
Dim newGraphics As Graphics = Me.CreateGraphics()
newGraphics.SetClip(New Rectangle(0, 0, 100, 100))
' Update clipping region of graphics to clipping region of new
' graphics.
e.Graphics.SetClip(newGraphics, CombineMode.Replace)
' Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
' Release new graphics.
newGraphics.Dispose()
End Sub
적용 대상
SetClip(RectangleF)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
이 Graphics의 클립 영역을 RectangleF 구조체에 의해 지정된 사각형으로 설정합니다.
public:
void SetClip(System::Drawing::RectangleF rect);
public void SetClip (System.Drawing.RectangleF rect);
member this.SetClip : System.Drawing.RectangleF -> unit
Public Sub SetClip (rect As RectangleF)
매개 변수
- rect
- RectangleF
새 클립 영역을 나타내는 RectangleF 구조체입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
클리핑 영역에 대한 작은 사각형을 만듭니다.
클리핑 영역을 사각형으로 설정합니다.
큰 사각형을 단색 검은색 브러시로 채웁니다.
그 결과 작고 채워진 검은색 사각형이 생성됩니다.
public:
void SetClipRectangleF( PaintEventArgs^ e )
{
// Create rectangle for clipping region.
RectangleF clipRect = RectangleF(0.0F,0.0F,100.0F,100.0F);
// Set clipping region of graphics to rectangle.
e->Graphics->SetClip( clipRect );
// Fill rectangle to demonstrate clip region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
}
private void SetClipRectangleF(PaintEventArgs e)
{
// Create rectangle for clipping region.
RectangleF clipRect = new RectangleF(0.0F, 0.0F, 100.0F, 100.0F);
// Set clipping region of graphics to rectangle.
e.Graphics.SetClip(clipRect);
// Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
}
Private Sub SetClipRectangleF(ByVal e As PaintEventArgs)
' Create rectangle for clipping region.
Dim clipRect As New RectangleF(0.0F, 0.0F, 100.0F, 100.0F)
' Set clipping region of graphics to rectangle.
e.Graphics.SetClip(clipRect)
' Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
End Sub
적용 대상
SetClip(Rectangle)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void SetClip(System::Drawing::Rectangle rect);
public void SetClip (System.Drawing.Rectangle rect);
member this.SetClip : System.Drawing.Rectangle -> unit
Public Sub SetClip (rect As Rectangle)
매개 변수
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
클리핑 영역에 대한 작은 사각형을 만듭니다.
클리핑 영역을 사각형으로 설정합니다.
큰 사각형을 단색 검은색 브러시로 채웁니다.
그 결과 작고 채워진 검은색 사각형이 생성됩니다.
public:
void SetClipRectangle( PaintEventArgs^ e )
{
// Create rectangle for clipping region.
Rectangle clipRect = Rectangle(0,0,100,100);
// Set clipping region of graphics to rectangle.
e->Graphics->SetClip( clipRect );
// Fill rectangle to demonstrate clip region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
}
private void SetClipRectangle(PaintEventArgs e)
{
// Create rectangle for clipping region.
Rectangle clipRect = new Rectangle(0, 0, 100, 100);
// Set clipping region of graphics to rectangle.
e.Graphics.SetClip(clipRect);
// Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
}
Private Sub SetClipRectangle(ByVal e As PaintEventArgs)
' Create rectangle for clipping region.
Dim clipRect As New Rectangle(0, 0, 100, 100)
' Set clipping region of graphics to rectangle.
e.Graphics.SetClip(clipRect)
' Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
End Sub
적용 대상
SetClip(Graphics)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void SetClip(System::Drawing::Graphics ^ g);
public void SetClip (System.Drawing.Graphics g);
member this.SetClip : System.Drawing.Graphics -> unit
Public Sub SetClip (g As Graphics)
매개 변수
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며, 이벤트 처리기의 매개 변수인 와 예제의 Paint 가 Form 필요합니다PaintEventArgse
.thisForm
코드는 다음 작업을 수행합니다.
임시 Graphics 의 클리핑 영역을 작은 사각형으로 설정합니다.
폼 그래픽 개체의 클리핑 영역을 임시 Graphics의 클리핑 영역으로 업데이트.
큰 사각형을 단색 검은색 브러시로 채웁니다.
그 결과 작고 채워진 검은색 사각형이 생성됩니다.
public:
void SetClipGraphics( PaintEventArgs^ e )
{
// Create temporary graphics object and set its clipping region.
Graphics^ newGraphics = this->CreateGraphics();
newGraphics->SetClip( Rectangle(0,0,100,100) );
// Update clipping region of graphics to clipping region of new
// graphics.
e->Graphics->SetClip( newGraphics );
// Fill rectangle to demonstrate clip region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
// Release new graphics.
delete newGraphics;
}
private void SetClipGraphics(PaintEventArgs e)
{
// Create temporary graphics object and set its clipping region.
Graphics newGraphics = this.CreateGraphics();
newGraphics.SetClip(new Rectangle(0, 0, 100, 100));
// Update clipping region of graphics to clipping region of new
// graphics.
e.Graphics.SetClip(newGraphics);
// Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
// Release new graphics.
newGraphics.Dispose();
}
Private Sub SetClipGraphics(ByVal e As PaintEventArgs)
' Create temporary graphics object and set its clipping region.
Dim newGraphics As Graphics = Me.CreateGraphics()
newGraphics.SetClip(New Rectangle(0, 0, 100, 100))
' Update clipping region of graphics to clipping region of new
' graphics.
e.Graphics.SetClip(newGraphics)
' Fill rectangle to demonstrate clip region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
' Release new graphics.
newGraphics.Dispose()
End Sub
적용 대상
SetClip(GraphicsPath)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
이 Graphics의 클립 영역을 지정된 GraphicsPath로 설정합니다.
public:
void SetClip(System::Drawing::Drawing2D::GraphicsPath ^ path);
public void SetClip (System.Drawing.Drawing2D.GraphicsPath path);
member this.SetClip : System.Drawing.Drawing2D.GraphicsPath -> unit
Public Sub SetClip (path As GraphicsPath)
매개 변수
- path
- GraphicsPath
새 클립 영역을 나타내는 GraphicsPath입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
그래픽 경로를 만들고 경로에 타원을 추가합니다.
클리핑 영역을 타원형 경로로 설정합니다.
큰 사각형을 단색 검은색 브러시로 채웁니다.
결과는 채워진 검은색 타원입니다.
public:
void SetClipPath( PaintEventArgs^ e )
{
// Create graphics path.
GraphicsPath^ clipPath = gcnew GraphicsPath;
clipPath->AddEllipse( 0, 0, 200, 100 );
// Set clipping region to path.
e->Graphics->SetClip( clipPath );
// Fill rectangle to demonstrate clipping region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
}
private void SetClipPath(PaintEventArgs e)
{
// Create graphics path.
GraphicsPath clipPath = new GraphicsPath();
clipPath.AddEllipse(0, 0, 200, 100);
// Set clipping region to path.
e.Graphics.SetClip(clipPath);
// Fill rectangle to demonstrate clipping region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
}
Private Sub SetClipPath(ByVal e As PaintEventArgs)
' Create graphics path.
Dim clipPath As New GraphicsPath
clipPath.AddEllipse(0, 0, 200, 100)
' Set clipping region to path.
e.Graphics.SetClip(clipPath)
' Fill rectangle to demonstrate clipping region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
End Sub
설명
매개 변수가 나타내는 path
그래픽 경로가 닫혀 있지 않으면 마지막 지점에서 첫 번째 지점까지 추가 세그먼트가 추가되어 경로를 닫습니다.
적용 대상
SetClip(GraphicsPath, CombineMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
현재 클립 영역과 지정된 Graphics를 결합하는 지정된 작업의 결과로 이 GraphicsPath의 클립 영역을 설정합니다.
public:
void SetClip(System::Drawing::Drawing2D::GraphicsPath ^ path, System::Drawing::Drawing2D::CombineMode combineMode);
public void SetClip (System.Drawing.Drawing2D.GraphicsPath path, System.Drawing.Drawing2D.CombineMode combineMode);
member this.SetClip : System.Drawing.Drawing2D.GraphicsPath * System.Drawing.Drawing2D.CombineMode -> unit
Public Sub SetClip (path As GraphicsPath, combineMode As CombineMode)
매개 변수
- path
- GraphicsPath
결합할 GraphicsPath입니다.
- combineMode
- CombineMode
사용할 결합 작업을 지정하는 CombineMode 열거형의 멤버입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
그래픽 경로를 만들고 경로에 타원을 추가합니다.
멤버를 사용하여 클리핑 영역을 타원 경로로 Replace 설정합니다.
큰 사각형을 단색 검은색 브러시로 채웁니다.
결과는 채워진 검은색 타원입니다.
public:
void SetClipPathCombine( PaintEventArgs^ e )
{
// Create graphics path.
GraphicsPath^ clipPath = gcnew GraphicsPath;
clipPath->AddEllipse( 0, 0, 200, 100 );
// Set clipping region to path.
e->Graphics->SetClip( clipPath, CombineMode::Replace );
// Fill rectangle to demonstrate clipping region.
e->Graphics->FillRectangle( gcnew SolidBrush( Color::Black ), 0, 0, 500, 300 );
}
private void SetClipPathCombine(PaintEventArgs e)
{
// Create graphics path.
GraphicsPath clipPath = new GraphicsPath();
clipPath.AddEllipse(0, 0, 200, 100);
// Set clipping region to path.
e.Graphics.SetClip(clipPath, CombineMode.Replace);
// Fill rectangle to demonstrate clipping region.
e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);
}
Private Sub SetClipPathCombine(ByVal e As PaintEventArgs)
' Create graphics path.
Dim clipPath As New GraphicsPath
clipPath.AddEllipse(0, 0, 200, 100)
' Set clipping region to path.
e.Graphics.SetClip(clipPath, CombineMode.Replace)
' Fill rectangle to demonstrate clipping region.
e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, _
500, 300)
End Sub
설명
매개 변수가 나타내는 path
그래픽 경로가 닫혀 있지 않으면 마지막 지점에서 첫 번째 지점까지 추가 세그먼트가 추가되어 경로를 닫습니다.
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기