GraphicsPath.Widen 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 경로를 지정된 펜으로 그릴 때 채워지는 영역을 둘러싸는 곡선으로 이 경로를 바꿉니다.
오버로드
Widen(Pen, Matrix) |
GraphicsPath에 윤곽선을 추가합니다. |
Widen(Pen) |
경로에 윤곽선을 추가합니다. |
Widen(Pen, Matrix, Single) |
이 경로를 지정된 펜으로 그릴 때 채워지는 영역을 둘러싸는 곡선으로 이 GraphicsPath를 바꿉니다. |
Widen(Pen, Matrix)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
GraphicsPath에 윤곽선을 추가합니다.
public:
void Widen(System::Drawing::Pen ^ pen, System::Drawing::Drawing2D::Matrix ^ matrix);
public void Widen (System.Drawing.Pen pen, System.Drawing.Drawing2D.Matrix matrix);
public void Widen (System.Drawing.Pen pen, System.Drawing.Drawing2D.Matrix? matrix);
member this.Widen : System.Drawing.Pen * System.Drawing.Drawing2D.Matrix -> unit
Public Sub Widen (pen As Pen, matrix As Matrix)
매개 변수
예제
예제를 보려면 Widen(Pen, Matrix, Single)를 참조하세요.
설명
이 메서드는 기존 줄과 새 윤곽선 사이의 거리가 호출에 GraphicsPath사용된 Widen의 너비 Pen 와 동일한 원래 줄 주위에 윤곽선을 만듭니다. 줄 사이의 공간을 채우려면 를 DrawPath사용해야 FillPath 합니다.
적용 대상
Widen(Pen)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
경로에 윤곽선을 추가합니다.
public:
void Widen(System::Drawing::Pen ^ pen);
public void Widen (System.Drawing.Pen pen);
member this.Widen : System.Drawing.Pen -> unit
Public Sub Widen (pen As Pen)
매개 변수
예제
예제를 보려면 Widen(Pen, Matrix, Single)를 참조하세요.
설명
이 메서드는 기존 줄과 새 윤곽선 사이의 거리가 호출에 GraphicsPath사용된 Widen의 너비 Pen 와 동일한 원래 줄 주위에 윤곽선을 만듭니다. 줄 사이의 공간을 채우려면 를 DrawPath사용해야 FillPath 합니다.
적용 대상
Widen(Pen, Matrix, Single)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 경로를 지정된 펜으로 그릴 때 채워지는 영역을 둘러싸는 곡선으로 이 GraphicsPath를 바꿉니다.
public:
void Widen(System::Drawing::Pen ^ pen, System::Drawing::Drawing2D::Matrix ^ matrix, float flatness);
public void Widen (System.Drawing.Pen pen, System.Drawing.Drawing2D.Matrix matrix, float flatness);
public void Widen (System.Drawing.Pen pen, System.Drawing.Drawing2D.Matrix? matrix, float flatness);
member this.Widen : System.Drawing.Pen * System.Drawing.Drawing2D.Matrix * single -> unit
Public Sub Widen (pen As Pen, matrix As Matrix, flatness As Single)
매개 변수
- flatness
- Single
곡선에 대한 직선화 정도를 지정하는 값입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 개체인 가 OnPaint 필요합니다PaintEventArgse
. 코드는 다음 작업을 수행합니다.
경로를 만들고 경로에 두 줄임표를 추가합니다.
경로를 검은색으로 그립니다.
경로를 확장합니다.
경로를 빨간색으로 그립니다.
두 번째 렌더링은 대신 DrawPath를 사용 FillPath 하므로 렌더링된 그림에 윤곽선이 채워져 있습니다.
private:
void WidenExample( PaintEventArgs^ e )
{
// Create a path and add two ellipses.
GraphicsPath^ myPath = gcnew GraphicsPath;
myPath->AddEllipse( 0, 0, 100, 100 );
myPath->AddEllipse( 100, 0, 100, 100 );
// Draw the original ellipses to the screen in black.
e->Graphics->DrawPath( Pens::Black, myPath );
// Widen the path.
Pen^ widenPen = gcnew Pen( Color::Black,10.0f );
Matrix^ widenMatrix = gcnew Matrix;
widenMatrix->Translate( 50, 50 );
myPath->Widen( widenPen, widenMatrix, 1.0f );
// Draw the widened path to the screen in red.
e->Graphics->FillPath( gcnew SolidBrush( Color::Red ), myPath );
}
private void WidenExample(PaintEventArgs e)
{
// Create a path and add two ellipses.
GraphicsPath myPath = new GraphicsPath();
myPath.AddEllipse(0, 0, 100, 100);
myPath.AddEllipse(100, 0, 100, 100);
// Draw the original ellipses to the screen in black.
e.Graphics.DrawPath(Pens.Black, myPath);
// Widen the path.
Pen widenPen = new Pen(Color.Black, 10);
Matrix widenMatrix = new Matrix();
widenMatrix.Translate(50, 50);
myPath.Widen(widenPen, widenMatrix, 1.0f);
// Draw the widened path to the screen in red.
e.Graphics.FillPath(new SolidBrush(Color.Red), myPath);
}
Public Sub WidenExample(ByVal e As PaintEventArgs)
Dim myPath As New GraphicsPath
myPath.AddEllipse(0, 0, 100, 100)
myPath.AddEllipse(100, 0, 100, 100)
e.Graphics.DrawPath(Pens.Black, myPath)
Dim widenPen As New Pen(Color.Black, 10)
Dim widenMatrix As New Matrix
widenMatrix.Translate(50, 50)
myPath.Widen(widenPen, widenMatrix, 1.0F)
' Sets tension for curves.
e.Graphics.FillPath(New SolidBrush(Color.Red), myPath)
End Sub
설명
이 메서드는 기존 줄과 새 윤곽선 사이의 거리가 호출에 GraphicsPath사용된 Widen의 너비 Pen 와 동일한 원래 줄 주위에 윤곽선을 만듭니다. 줄 사이의 공간을 채우려면 를 DrawPath사용해야 FillPath 합니다.
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기