Share via


TextureBrush.MultiplyTransform Methode

Definition

Multipliziert das Matrix-Objekt, das die lokale geometrische Transformation dieses TextureBrush-Objekts darstellt, mit dem angegebenen Matrix-Objekt in der angegebenen Reihenfolge.

Überlädt

MultiplyTransform(Matrix, MatrixOrder)

Multipliziert das Matrix-Objekt, das die lokale geometrische Transformation dieses TextureBrush-Objekts darstellt, mit dem angegebenen Matrix-Objekt in der angegebenen Reihenfolge.

MultiplyTransform(Matrix)

Multipliziert das Matrix-Objekt, das die lokale geometrische Transformation dieses TextureBrush-Objekts darstellt, mit dem angegebenen Matrix-Objekt, indem das angegebene Matrix-Objekt vorangestellt wird.

MultiplyTransform(Matrix, MatrixOrder)

Quelle:
TextureBrush.cs
Quelle:
TextureBrush.cs
Quelle:
TextureBrush.cs

Multipliziert das Matrix-Objekt, das die lokale geometrische Transformation dieses TextureBrush-Objekts darstellt, mit dem angegebenen Matrix-Objekt in der angegebenen Reihenfolge.

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)

Parameter

matrix
Matrix

Das Matrix-Objekt, mit dem die geometrische Transformation multipliziert wird.

order
MatrixOrder

Eine MatrixOrder-Enumeration, die die Reihenfolge angibt, in der die beiden Matrizen multipliziert werden sollen.

Beispiele

Das folgende Beispiel ist für die Verwendung mit Windows Forms konzipiert und erfordert PaintEventArgse, was ein Parameter des Paint Ereignishandlers ist. Der Code führt die folgenden Aktionen aus:

  • Erstellt ein TextureBrush-Objekt.

  • Erstellt eine neue Matrix, die eine Übersetzung von 50 Einheiten in x-Richtung angibt.

  • Multipliziert die Matrix mit der Transformationsmatrix des Texturpinsels.

  • Füllt ein Rechteck mit dem Texturpinsel aus.

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

Hinweise

Die Transformationsmatrix eines TextureBrush Objekts gibt an, wie das Bild, das die Textur definiert, transformiert wird. Wenn die Transformationsmatrix beispielsweise eine Drehung von 90 Grad im Uhrzeigersinn angibt, wird das Texturbild um 90 Grad im Uhrzeigersinn gedreht.

Gilt für:

MultiplyTransform(Matrix)

Quelle:
TextureBrush.cs
Quelle:
TextureBrush.cs
Quelle:
TextureBrush.cs

Multipliziert das Matrix-Objekt, das die lokale geometrische Transformation dieses TextureBrush-Objekts darstellt, mit dem angegebenen Matrix-Objekt, indem das angegebene Matrix-Objekt vorangestellt wird.

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)

Parameter

matrix
Matrix

Das Matrix-Objekt, mit dem die geometrische Transformation multipliziert wird.

Beispiele

Das folgende Beispiel ist für die Verwendung mit Windows Forms konzipiert und erfordert PaintEventArgse, was ein Parameter des Paint Ereignishandlers ist. Der Code führt die folgenden Aktionen aus:

  • Erstellt ein TextureBrush-Objekt.

  • Erstellt eine neue Matrix, die eine Übersetzung von 50 Einheiten in x-Richtung angibt.

  • Multipliziert die Matrix mit der Transformationsmatrix des Texturpinsels.

  • Füllt ein Rechteck mit dem Texturpinsel aus.

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

Hinweise

Die Transformationsmatrix eines TextureBrush Objekts gibt an, wie das Bild, das die Textur definiert, transformiert wird. Wenn die Transformationsmatrix beispielsweise eine Drehung von 90 Grad im Uhrzeigersinn angibt, wird das Texturbild um 90 Grad im Uhrzeigersinn gedreht.

Gilt für: