TextureBrush.TranslateTransform メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した順序で、指定した寸法だけこの TextureBrush オブジェクトのローカル ジオメトリック変換を平行移動します。
オーバーロード
TranslateTransform(Single, Single) |
指定した寸法でこの TextureBrush オブジェクトのローカル ジオメトリック変換を平行移動します。 このメソッドは変換の前に平行移動を行います。 |
TranslateTransform(Single, Single, MatrixOrder) |
指定した順序で、指定した寸法だけこの TextureBrush オブジェクトのローカル ジオメトリック変換を平行移動します。 |
TranslateTransform(Single, Single)
- ソース:
- TextureBrush.cs
- ソース:
- TextureBrush.cs
- ソース:
- TextureBrush.cs
指定した寸法でこの TextureBrush オブジェクトのローカル ジオメトリック変換を平行移動します。 このメソッドは変換の前に平行移動を行います。
public:
void TranslateTransform(float dx, float dy);
public void TranslateTransform (float dx, float dy);
member this.TranslateTransform : single * single -> unit
Public Sub TranslateTransform (dx As Single, dy As Single)
パラメーター
- dx
- Single
X 方向に変換を平行移動するディメンションです。
- dy
- Single
Y 方向に変換を平行移動するディメンションです。
例
次の例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaint
パラメーターである が必要PaintEventArgse
です。 コードは、次のアクションを実行します。
TextureBrush オブジェクトを作成します。
テクスチャ イメージを x 方向に 50 単位移動します。
テクスチャ ブラシを使用して、画面上の四角形を塗りつぶします。
void TranslateTransform_Example1( PaintEventArgs^ e )
{
// Create a TextureBrush object.
TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );
// Move the texture image 2X in the x-direction.
tBrush->TranslateTransform( 50, 0, MatrixOrder::Prepend );
// Fill a rectangle with tBrush.
e->Graphics->FillRectangle( tBrush, 0, 0, 100, 100 );
}
public void TranslateTransform_Example1(PaintEventArgs e)
{
// Create a TextureBrush object.
TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
// Move the texture image 2X in the x-direction.
tBrush.TranslateTransform(50, 0, MatrixOrder.Prepend);
// Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100);
}
Public Sub TranslateTransform_Example1(ByVal e As PaintEventArgs)
' Create a TextureBrush object.
Dim tBrush As New TextureBrush(New Bitmap("texture.jpg"))
' Move the texture image 2X in the x-direction.
tBrush.TranslateTransform(50, 0, MatrixOrder.Prepend)
' Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100)
End Sub
適用対象
TranslateTransform(Single, Single, MatrixOrder)
- ソース:
- TextureBrush.cs
- ソース:
- TextureBrush.cs
- ソース:
- TextureBrush.cs
指定した順序で、指定した寸法だけこの TextureBrush オブジェクトのローカル ジオメトリック変換を平行移動します。
public:
void TranslateTransform(float dx, float dy, System::Drawing::Drawing2D::MatrixOrder order);
public void TranslateTransform (float dx, float dy, System.Drawing.Drawing2D.MatrixOrder order);
member this.TranslateTransform : single * single * System.Drawing.Drawing2D.MatrixOrder -> unit
Public Sub TranslateTransform (dx As Single, dy As Single, order As MatrixOrder)
パラメーター
- dx
- Single
X 方向に変換を平行移動するディメンションです。
- dy
- Single
Y 方向に変換を平行移動するディメンションです。
- order
- MatrixOrder
平行移動を適用する順序 (前または後)。
例
次の例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaint
パラメーターである が必要PaintEventArgse
です。 コードは、次のアクションを実行します。
TextureBrush オブジェクトを作成します。
テクスチャ イメージを x 方向に 50 単位移動します。
テクスチャ ブラシを使用して、画面上の四角形を塗りつぶします。
void TranslateTransform_Example2( PaintEventArgs^ e )
{
// Create a TextureBrush object.
TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );
// Move the texture image 2X in the x-direction.
tBrush->TranslateTransform( 50, 0 );
// Fill a rectangle with tBrush.
e->Graphics->FillRectangle( tBrush, 0, 0, 100, 100 );
}
public void TranslateTransform_Example2(PaintEventArgs e)
{
// Create a TextureBrush object.
TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
// Move the texture image 2X in the x-direction.
tBrush.TranslateTransform(50, 0);
// Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100);
}
Public Sub TranslateTransform_Example2(ByVal e As PaintEventArgs)
' Create a TextureBrush object.
Dim tBrush As New TextureBrush(New Bitmap("texture.jpg"))
' Move the texture image 2X in the x-direction.
tBrush.TranslateTransform(50, 0)
' Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100)
End Sub
適用対象
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示