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
- 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 -> unitPublic Sub MultiplyTransform (matrix As Matrix, order As MatrixOrder)参数
- order
- MatrixOrder
一个 MatrixOrder 枚举,用于指定要乘以两个矩阵的顺序。
示例
下面的示例设计用于 Windows 窗体,它需要 PaintEventArgse,这是 Paint 事件处理程序的参数。 该代码执行以下操作:
- 创建 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
- 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 -> unitPublic Sub MultiplyTransform (matrix As Matrix)参数
示例
下面的示例设计用于 Windows 窗体,它需要 PaintEventArgse,这是 Paint 事件处理程序的参数。 该代码执行以下操作:
- 创建 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 度。