TextureBrush オブジェクトのローカル ジオメトリック変換を表す Matrix オブジェクトに、指定された Matrix オブジェクトを指定された順序で乗算します。
Overloads Public Sub MultiplyTransform( _
ByVal matrix As Matrix, _ ByVal order As MatrixOrder _)
[C#]
public void MultiplyTransform(Matrixmatrix,MatrixOrderorder);
[C++]
public: void MultiplyTransform(Matrix* matrix,MatrixOrderorder);
[JScript]
public function MultiplyTransform(
matrix : Matrix,order : MatrixOrder);
パラメータ
- matrix
ジオメトリック変換の乗算に使用する Matrix オブジェクト。 - order
2 つの行列を乗算する順序を指定する MatrixOrder 列挙体。
戻り値
このメソッドは値を返しません。
解説
TextureBrush オブジェクトの変換行列は、テクスチャを定義するイメージの変換方法を指定します。たとえば、変換行列が時計回りの 90 度の回転を指定する場合、テクスチャ イメージは時計回りに 90 度回転します。
使用例
[Visual Basic, C#] 次の例は、Windows フォームでの使用を意図してデザインされており、 Paint イベント ハンドラのパラメータである PaintEventArgs e が必要です。このコードは次のアクションを実行します。
- TextureBrush オブジェクトを作成します。
- x 方向への 50 単位の平行移動を指定する、新しい行列を作成します。
- その行列と、テクスチャ ブラシの変換行列を乗算します。
- テクスチャ ブラシを使用して、四角形を塗りつぶします。
Public Sub MultiplyTransform_Example(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
[C#]
public void MultiplyTransform_Example(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);
}
[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
TextureBrush クラス | TextureBrush メンバ | System.Drawing 名前空間 | TextureBrush.MultiplyTransform オーバーロードの一覧