TextureBrush.ScaleTransform メソッド

定義

指定の量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換をスケーリングします。 このメソッドは変換の前にスケーリング行列を適用します。

オーバーロード

ScaleTransform(Single, Single)

指定の量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換をスケーリングします。 このメソッドは変換の前にスケーリング行列を適用します。

ScaleTransform(Single, Single, MatrixOrder)

指定した順序で、指定した量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換をスケーリングします。

ScaleTransform(Single, Single)

ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs

指定の量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換をスケーリングします。 このメソッドは変換の前にスケーリング行列を適用します。

public:
 void ScaleTransform(float sx, float sy);
public void ScaleTransform (float sx, float sy);
member this.ScaleTransform : single * single -> unit
Public Sub ScaleTransform (sx As Single, sy As Single)

パラメーター

sx
Single

x 方向に変換をスケーリングする量。

sy
Single

y 方向に変換をスケーリングする量。

次の例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaintパラメーターである が必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • TextureBrush オブジェクトを作成します。

  • テクスチャ イメージを x 方向に 2 回スケーリングします。

  • テクスチャ ブラシを使用して、画面上の四角形を塗りつぶします。

void ScaleTransform_Example1( PaintEventArgs^ e )
{
   // Create a TextureBrush object.
   TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );

   // Scale the texture image 2X in the x-direction.
   tBrush->ScaleTransform( 2, 1 );

   // Fill a rectangle with tBrush.
   e->Graphics->FillRectangle( tBrush, 0, 0, 100, 100 );
}
public void ScaleTransform_Example1(PaintEventArgs e)
{
             
    // Create a TextureBrush object.
    TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
             
    // Scale the texture image 2X in the x-direction.
    tBrush.ScaleTransform(2, 1);
             
    // Fill a rectangle with tBrush.
    e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100);
}
Public Sub ScaleTransform_Example1(ByVal e As PaintEventArgs)

    ' Create a TextureBrush object.
    Dim tBrush As New TextureBrush(New Bitmap("texture.jpg"))

    ' Scale the texture image 2X in the x-direction.
    tBrush.ScaleTransform(2, 1)

    ' Fill a rectangle with tBrush.
    e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100)
End Sub

適用対象

ScaleTransform(Single, Single, MatrixOrder)

ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs

指定した順序で、指定した量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換をスケーリングします。

public:
 void ScaleTransform(float sx, float sy, System::Drawing::Drawing2D::MatrixOrder order);
public void ScaleTransform (float sx, float sy, System.Drawing.Drawing2D.MatrixOrder order);
member this.ScaleTransform : single * single * System.Drawing.Drawing2D.MatrixOrder -> unit
Public Sub ScaleTransform (sx As Single, sy As Single, order As MatrixOrder)

パラメーター

sx
Single

x 方向に変換をスケーリングする量。

sy
Single

y 方向に変換をスケーリングする量。

order
MatrixOrder

スケーリング行列を後に適用するか、前に適用するかを指定する MatrixOrder 列挙値。

次の例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaintパラメーターである が必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • TextureBrush オブジェクトを作成します。

  • テクスチャ イメージを x 方向に 2 回スケーリングします。

  • テクスチャ ブラシを使用して、画面上の四角形を塗りつぶします。

void ScaleTransform_Example2( PaintEventArgs^ e )
{
   // Create a TextureBrush object.
   TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );

   // Scale the texture image 2X in the x-direction.
   tBrush->ScaleTransform( 2, 1, MatrixOrder::Prepend );

   // Fill a rectangle with tBrush.
   e->Graphics->FillRectangle( tBrush, 0, 0, 100, 100 );
}
public void ScaleTransform_Example2(PaintEventArgs e)
{
             
    // Create a TextureBrush object.
    TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
             
    // Scale the texture image 2X in the x-direction.
    tBrush.ScaleTransform(2, 1, MatrixOrder.Prepend);
             
    // Fill a rectangle with tBrush.
    e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100);
}
Public Sub ScaleTransform_Example2(ByVal e As PaintEventArgs)

    ' Create a TextureBrush object.
    Dim tBrush As New TextureBrush(New Bitmap("texture.jpg"))

    ' Scale the texture image 2X in the x-direction.
    tBrush.ScaleTransform(2, 1, MatrixOrder.Prepend)

    ' Fill a rectangle with tBrush.
    e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100)
End Sub

適用対象