Aracılığıyla paylaş


TextureBrush.MultiplyTransform Yöntem

Tanım

Bu TextureBrush nesnenin Matrix yerel geometrik dönüştürmesini temsil eden nesneyi belirtilen sırada belirtilen Matrix nesneyle çarpar.

Aşırı Yüklemeler

MultiplyTransform(Matrix, MatrixOrder)

Bu TextureBrush nesnenin Matrix yerel geometrik dönüştürmesini temsil eden nesneyi belirtilen sırada belirtilen Matrix nesneyle çarpar.

MultiplyTransform(Matrix)

Matrix Belirtilen nesneyi önceden kaldırarak bu TextureBrush nesnenin yerel geometrik dönüşümünün temsil ettiği nesneyi belirtilen MatrixMatrix nesneyle çarpar.

MultiplyTransform(Matrix, MatrixOrder)

Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs

Bu TextureBrush nesnenin Matrix yerel geometrik dönüştürmesini temsil eden nesneyi belirtilen sırada belirtilen Matrix nesneyle çarpar.

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)

Parametreler

matrix
Matrix

Geometrik Matrix dönüşümün çarpıldığı nesne.

order
MatrixOrder

MatrixOrder İki matrisin çarpıldığı sırayı belirten bir numaralandırma.

Örnekler

Aşağıdaki örnek, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse.Paint Kod aşağıdaki eylemleri gerçekleştirir:

  • Bir TextureBrush nesnesi oluşturur.

  • X yönünde 50 birimin çevirisini belirten yeni bir matris oluşturur.

  • Matrisi doku fırçasının dönüşüm matrisiyle çarpar.

  • Doku fırçasını kullanarak dikdörtgeni doldurur.

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

Açıklamalar

Bir TextureBrush nesnenin dönüştürme matrisi, dokuyu tanımlayan görüntünün nasıl dönüştürüldüğünü belirtir. Örneğin, dönüştürme matrisi saat yönünde 90 derece döndürme belirtirse, doku görüntüsü saat yönünde 90 derece döndürülür.

Şunlara uygulanır

MultiplyTransform(Matrix)

Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs

Matrix Belirtilen nesneyi önceden kaldırarak bu TextureBrush nesnenin yerel geometrik dönüşümünün temsil ettiği nesneyi belirtilen MatrixMatrix nesneyle çarpar.

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)

Parametreler

matrix
Matrix

Geometrik Matrix dönüşümün çarpıldığı nesne.

Örnekler

Aşağıdaki örnek, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse.Paint Kod aşağıdaki eylemleri gerçekleştirir:

  • Bir TextureBrush nesnesi oluşturur.

  • X yönünde 50 birimin çevirisini belirten yeni bir matris oluşturur.

  • Matrisi doku fırçasının dönüşüm matrisiyle çarpar.

  • Doku fırçasını kullanarak dikdörtgeni doldurur.

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

Açıklamalar

Bir TextureBrush nesnenin dönüştürme matrisi, dokuyu tanımlayan görüntünün nasıl dönüştürüldüğünü belirtir. Örneğin, dönüştürme matrisi saat yönünde 90 derece döndürme belirtirse, doku görüntüsü saat yönünde 90 derece döndürülür.

Şunlara uygulanır