GraphicsPath.Warp 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다.
오버로드
Warp(PointF[], RectangleF) |
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다. |
Warp(PointF[], RectangleF, Matrix) |
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다. |
Warp(PointF[], RectangleF, Matrix, WarpMode) |
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다. |
Warp(PointF[], RectangleF, Matrix, WarpMode, Single) |
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다. |
Warp(ReadOnlySpan<PointF>, RectangleF, Matrix, WarpMode, Single) |
Warp(PointF[], RectangleF)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다.
public:
void Warp(cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::RectangleF srcRect);
public void Warp (System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect);
member this.Warp : System.Drawing.PointF[] * System.Drawing.RectangleF -> unit
Public Sub Warp (destPoints As PointF(), srcRect As RectangleF)
매개 변수
- destPoints
- PointF[]
srcRect
에 의해 정의된 사각형이 변환되는 평행 사변형을 정의하는 PointF 구조체의 배열입니다. 이 배열에 세 개 또는 네 개의 요소를 포함할 수 있는데, 세 개의 요소를 포함하는 경우 처음 세 지점이 평행 사변형의 오른쪽 아래 모퉁이가 됩니다.
- srcRect
- RectangleF
destPoints
로 정의된 평행 사변형으로 변환되는 사각형을 나타내는 RectangleF입니다.
예제
예제를 보려면 Warp(PointF[], RectangleF, Matrix, WarpMode, Single)를 참조하세요.
적용 대상
Warp(PointF[], RectangleF, Matrix)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다.
public:
void Warp(cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::RectangleF srcRect, System::Drawing::Drawing2D::Matrix ^ matrix);
public void Warp (System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.Drawing2D.Matrix matrix);
public void Warp (System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.Drawing2D.Matrix? matrix);
member this.Warp : System.Drawing.PointF[] * System.Drawing.RectangleF * System.Drawing.Drawing2D.Matrix -> unit
Public Sub Warp (destPoints As PointF(), srcRect As RectangleF, matrix As Matrix)
매개 변수
- destPoints
- PointF[]
srcRect
에 의해 정의된 사각형이 변환되는 평행 사변형을 정의하는 PointF 구조체의 배열입니다. 이 배열에 세 개 또는 네 개의 요소를 포함할 수 있는데, 세 개의 요소를 포함하는 경우 처음 세 지점이 평행 사변형의 오른쪽 아래 모퉁이가 됩니다.
- srcRect
- RectangleF
destPoints
로 정의된 평행 사변형으로 변환되는 사각형을 나타내는 RectangleF입니다.
예제
예제를 보려면 Warp(PointF[], RectangleF, Matrix, WarpMode, Single)를 참조하세요.
적용 대상
Warp(PointF[], RectangleF, Matrix, WarpMode)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다.
public:
void Warp(cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::RectangleF srcRect, System::Drawing::Drawing2D::Matrix ^ matrix, System::Drawing::Drawing2D::WarpMode warpMode);
public void Warp (System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.Drawing2D.Matrix matrix, System.Drawing.Drawing2D.WarpMode warpMode);
public void Warp (System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.Drawing2D.Matrix? matrix, System.Drawing.Drawing2D.WarpMode warpMode);
member this.Warp : System.Drawing.PointF[] * System.Drawing.RectangleF * System.Drawing.Drawing2D.Matrix * System.Drawing.Drawing2D.WarpMode -> unit
Public Sub Warp (destPoints As PointF(), srcRect As RectangleF, matrix As Matrix, warpMode As WarpMode)
매개 변수
- destPoints
- PointF[]
srcRect
에 의해 정의된 사각형이 변환되는 평행 사변형을 정의하는 PointF 구조체의 배열입니다. 이 배열에 세 개 또는 네 개의 요소를 포함할 수 있는데, 세 개의 요소를 포함하는 경우 처음 세 지점이 평행 사변형의 오른쪽 아래 모퉁이가 됩니다.
- srcRect
- RectangleF
destPoints
로 정의된 평행 사변형으로 변환되는 사각형을 나타내는 RectangleF입니다.
예제
예제를 보려면 Warp(PointF[], RectangleF, Matrix, WarpMode, Single)를 참조하세요.
적용 대상
Warp(PointF[], RectangleF, Matrix, WarpMode, Single)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 GraphicsPath에 사각형과 평행 사변형에 의해 정의된 휘기 변환을 적용합니다.
public:
void Warp(cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::RectangleF srcRect, System::Drawing::Drawing2D::Matrix ^ matrix, System::Drawing::Drawing2D::WarpMode warpMode, float flatness);
public void Warp (System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.Drawing2D.Matrix matrix, System.Drawing.Drawing2D.WarpMode warpMode, float flatness);
public void Warp (System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.Drawing2D.Matrix? matrix, System.Drawing.Drawing2D.WarpMode warpMode, float flatness);
member this.Warp : System.Drawing.PointF[] * System.Drawing.RectangleF * System.Drawing.Drawing2D.Matrix * System.Drawing.Drawing2D.WarpMode * single -> unit
Public Sub Warp (destPoints As PointF(), srcRect As RectangleF, matrix As Matrix, warpMode As WarpMode, flatness As Single)
매개 변수
- destPoints
- PointF[]
srcRect
에 의해 정의된 사각형이 변환되는 평행 사변형을 정의하는 PointF 구조체의 배열입니다. 이 배열에 세 개 또는 네 개의 요소를 포함할 수 있는데, 세 개의 요소를 포함하는 경우 처음 세 지점이 평행 사변형의 오른쪽 아래 모퉁이가 됩니다.
- srcRect
- RectangleF
destPoints
로 정의된 평행 사변형으로 변환되는 사각형을 나타내는 RectangleF입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 개체인 가 OnPaint 필요합니다PaintEventArgse
. 코드는 다음 작업을 수행합니다.
경로를 만들고 경로에 사각형을 추가합니다.
해당 사각형을 검은색으로 화면에 그립니다.
원근 변형으로 경로를 뒤틀 수 있습니다.
뒤틀린 사각형(경로)을 빨간색으로 화면에 그립니다.
private:
void WarpExample( PaintEventArgs^ e )
{
// Create a path and add a rectangle.
GraphicsPath^ myPath = gcnew GraphicsPath;
RectangleF srcRect = RectangleF(0,0,100,200);
myPath->AddRectangle( srcRect );
// Draw the source path (rectangle)to the screen.
e->Graphics->DrawPath( Pens::Black, myPath );
// Create a destination for the warped rectangle.
PointF point1 = PointF(200,200);
PointF point2 = PointF(400,250);
PointF point3 = PointF(220,400);
array<PointF>^ destPoints = {point1,point2,point3};
// Create a translation matrix.
Matrix^ translateMatrix = gcnew Matrix;
translateMatrix->Translate( 100, 0 );
// Warp the source path (rectangle).
myPath->Warp( destPoints, srcRect, translateMatrix, WarpMode::Perspective, 0.5f );
// Draw the warped path (rectangle) to the screen.
e->Graphics->DrawPath( gcnew Pen( Color::Red ), myPath );
}
private void WarpExample(PaintEventArgs e)
{
// Create a path and add a rectangle.
GraphicsPath myPath = new GraphicsPath();
RectangleF srcRect = new RectangleF(0, 0, 100, 200);
myPath.AddRectangle(srcRect);
// Draw the source path (rectangle)to the screen.
e.Graphics.DrawPath(Pens.Black, myPath);
// Create a destination for the warped rectangle.
PointF point1 = new PointF(200, 200);
PointF point2 = new PointF(400, 250);
PointF point3 = new PointF(220, 400);
PointF[] destPoints = {point1, point2, point3};
// Create a translation matrix.
Matrix translateMatrix = new Matrix();
translateMatrix.Translate(100, 0);
// Warp the source path (rectangle).
myPath.Warp(destPoints, srcRect, translateMatrix,
WarpMode.Perspective, 0.5f);
// Draw the warped path (rectangle) to the screen.
e.Graphics.DrawPath(new Pen(Color.Red), myPath);
}
Public Sub WarpExample(ByVal e As PaintEventArgs)
' Create a path and add a rectangle.
Dim myPath As New GraphicsPath
Dim srcRect As New RectangleF(0, 0, 100, 200)
myPath.AddRectangle(srcRect)
' Draw the source path (rectangle)to the screen.
e.Graphics.DrawPath(Pens.Black, myPath)
' Create a destination for the warped rectangle.
Dim point1 As New PointF(200, 200)
Dim point2 As New PointF(400, 250)
Dim point3 As New PointF(220, 400)
Dim destPoints As PointF() = {point1, point2, point3}
' Create a translation matrix.
Dim translateMatrix As New Matrix
translateMatrix.Translate(100, 0)
' Warp the source path (rectangle).
myPath.Warp(destPoints, srcRect, translateMatrix, _
WarpMode.Perspective, 0.5F)
' Draw the warped path (rectangle) to the screen.
e.Graphics.DrawPath(New Pen(Color.Red), myPath)
End Sub
적용 대상
Warp(ReadOnlySpan<PointF>, RectangleF, Matrix, WarpMode, Single)
- Source:
- GraphicsPath.cs
public void Warp (ReadOnlySpan<System.Drawing.PointF> destPoints, System.Drawing.RectangleF srcRect, System.Drawing.Drawing2D.Matrix? matrix = default, System.Drawing.Drawing2D.WarpMode warpMode = System.Drawing.Drawing2D.WarpMode.Perspective, float flatness = 0.25);
member this.Warp : ReadOnlySpan<System.Drawing.PointF> * System.Drawing.RectangleF * System.Drawing.Drawing2D.Matrix * System.Drawing.Drawing2D.WarpMode * single -> unit
Public Sub Warp (destPoints As ReadOnlySpan(Of PointF), srcRect As RectangleF, Optional matrix As Matrix = Nothing, Optional warpMode As WarpMode = System.Drawing.Drawing2D.WarpMode.Perspective, Optional flatness As Single = 0.25)
매개 변수
- destPoints
- ReadOnlySpan<PointF>
- srcRect
- RectangleF
- matrix
- Matrix
- warpMode
- WarpMode
- flatness
- Single
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기