다음을 통해 공유


TextureBrush.MultiplyTransform 메서드

정의

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)

매개 변수

matrix
Matrix

기하학 변환을 곱하는 Matrix 개체입니다.

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)

매개 변수

matrix
Matrix

기하학 변환을 곱하는 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도 회전됩니다.

적용 대상