TextureBrush.MultiplyTransform 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 TextureBrush 개체의 로컬 기하학적 변형을 나타내는 Matrix 개체에 지정된 순서로 지정된 Matrix 개체를 곱합니다.
오버로드
MultiplyTransform(Matrix, MatrixOrder) |
이 TextureBrush 개체의 로컬 기하학적 변형을 나타내는 Matrix 개체에 지정된 순서로 지정된 Matrix 개체를 곱합니다. |
MultiplyTransform(Matrix) |
이 TextureBrush 개체의 로컬 기하학적 변형을 나타내는 Matrix 개체에 지정된 Matrix 개체를 앞에 추가하여 지정된 Matrix 개체를 곱합니다. |
MultiplyTransform(Matrix, MatrixOrder)
- Source:
- TextureBrush.cs
- Source:
- TextureBrush.cs
- Source:
- TextureBrush.cs
이 TextureBrush 개체의 로컬 기하학적 변형을 나타내는 Matrix 개체에 지정된 순서로 지정된 Matrix 개체를 곱합니다.
public:
void MultiplyTransform(System::Drawing::Drawing2D::Matrix ^ matrix, System::Drawing::Drawing2D::MatrixOrder order);
public void MultiplyTransform (System.Drawing.Drawing2D.Matrix matrix, System.Drawing.Drawing2D.MatrixOrder order);
member this.MultiplyTransform : System.Drawing.Drawing2D.Matrix * System.Drawing.Drawing2D.MatrixOrder -> unit
Public Sub MultiplyTransform (matrix As Matrix, order As MatrixOrder)
매개 변수
- order
- MatrixOrder
두 매트릭스를 곱하는 하는 순서를 지정하는 MatrixOrder 열거형입니다.
예제
다음 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 매개 변수 Paint
인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
TextureBrush 개체를 만듭니다.
x 방향에서 50단원의 변환을 지정하는 새 행렬을 만듭니다.
행렬을 텍스처 브러시의 변환 매트릭스와 곱합니다.
텍스처 브러시를 사용하여 사각형을 채웁니다.
void MultiplyTransform_Example2( PaintEventArgs^ e )
{
// Create a TextureBrush object.
TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );
// Create a transformation matrix.
Matrix^ translateMatrix = gcnew Matrix;
translateMatrix->Translate( 50, 0 );
// Multiply the transformation matrix of tBrush by translateMatrix.
tBrush->MultiplyTransform( translateMatrix );
// Fill a rectangle with tBrush.
e->Graphics->FillRectangle( tBrush, 0, 110, 100, 100 );
}
public void MultiplyTransform_Example2(PaintEventArgs e)
{
// Create a TextureBrush object.
TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
// Create a transformation matrix.
Matrix translateMatrix = new Matrix();
translateMatrix.Translate(50, 0);
// Multiply the transformation matrix of tBrush by translateMatrix.
tBrush.MultiplyTransform(translateMatrix);
// Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 110, 100, 100);
}
Public Sub MultiplyTransform_Example2(ByVal e As PaintEventArgs)
' Create a TextureBrush object.
Dim tBrush As New TextureBrush(New Bitmap("texture.jpg"))
' Create a transformation matrix.
Dim translateMatrix As New Matrix
translateMatrix.Translate(50, 0)
' Multiply the transformation matrix of tBrush by translateMatrix.
tBrush.MultiplyTransform(translateMatrix)
' Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 110, 100, 100)
End Sub
설명
개체의 TextureBrush 변환 매트릭스는 텍스처를 정의하는 이미지가 변환되는 방식을 지정합니다. 예를 들어 변환 행렬이 시계 방향으로 90도 회전을 지정하는 경우 텍스처 이미지는 시계 방향으로 90도 회전됩니다.
적용 대상
MultiplyTransform(Matrix)
- Source:
- TextureBrush.cs
- Source:
- TextureBrush.cs
- Source:
- TextureBrush.cs
이 TextureBrush 개체의 로컬 기하학적 변형을 나타내는 Matrix 개체에 지정된 Matrix 개체를 앞에 추가하여 지정된 Matrix 개체를 곱합니다.
public:
void MultiplyTransform(System::Drawing::Drawing2D::Matrix ^ matrix);
public void MultiplyTransform (System.Drawing.Drawing2D.Matrix matrix);
member this.MultiplyTransform : System.Drawing.Drawing2D.Matrix -> unit
Public Sub MultiplyTransform (matrix As Matrix)
매개 변수
예제
다음 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 매개 변수 Paint
인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
TextureBrush 개체를 만듭니다.
x 방향에서 50단원의 변환을 지정하는 새 행렬을 만듭니다.
행렬을 텍스처 브러시의 변환 매트릭스와 곱합니다.
텍스처 브러시를 사용하여 사각형을 채웁니다.
public:
void MultiplyTransform_Example1( PaintEventArgs^ e )
{
// Create a TextureBrush object.
TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );
// Create a transformation matrix.
Matrix^ translateMatrix = gcnew Matrix;
translateMatrix->Translate( 50, 0 );
// Multiply the transformation matrix of tBrush by translateMatrix.
tBrush->MultiplyTransform( translateMatrix, MatrixOrder::Prepend );
// Fill a rectangle with tBrush.
e->Graphics->FillRectangle( tBrush, 0, 110, 100, 100 );
}
public void MultiplyTransform_Example1(PaintEventArgs e)
{
// Create a TextureBrush object.
TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
// Create a transformation matrix.
Matrix translateMatrix = new Matrix();
translateMatrix.Translate(50, 0);
// Multiply the transformation matrix of tBrush by translateMatrix.
tBrush.MultiplyTransform(translateMatrix, MatrixOrder.Prepend);
// Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 110, 100, 100);
}
Public Sub MultiplyTransform_Example1(ByVal e As PaintEventArgs)
' Create a TextureBrush object.
Dim tBrush As New TextureBrush(New Bitmap("texture.jpg"))
' Create a transformation matrix.
Dim translateMatrix As New Matrix
translateMatrix.Translate(50, 0)
' Multiply the transformation matrix of tBrush by translateMatrix.
tBrush.MultiplyTransform(translateMatrix, MatrixOrder.Prepend)
' Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 110, 100, 100)
End Sub
설명
개체의 TextureBrush 변환 매트릭스는 텍스처를 정의하는 이미지가 변환되는 방식을 지정합니다. 예를 들어 변환 행렬이 시계 방향으로 90도 회전을 지정하는 경우 텍스처 이미지는 시계 방향으로 90도 회전됩니다.
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기