Language

TextureBrush.ScaleTransform メソッド

定義

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

オーバーロード

名前 説明
ScaleTransform(Single, Single)

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

ScaleTransform(Single, Single, MatrixOrder)

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

ScaleTransform(Single, Single)

ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
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 フォームで使用できるように設計されており、PaintEventArgs イベント ハンドラーのパラメーターであるePaintが必要です。 コードは次のアクションを実行します。

  • 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.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
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 フォームで使用できるように設計されており、PaintEventArgs イベント ハンドラーのパラメーターであるePaintが必要です。 コードは次のアクションを実行します。

  • 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

適用対象