指定の量だけ、この TextureBrush オブジェクトのローカル ジオメトリック変換を指定の順序でスケーリングします。
Overloads Public Sub ScaleTransform( _
ByVal sx As Single, _ ByVal sy As Single, _ ByVal order As MatrixOrder _)
[C#]
public void ScaleTransform(floatsx,floatsy,MatrixOrderorder);
[C++]
public: void ScaleTransform(floatsx,floatsy,MatrixOrderorder);
[JScript]
public function ScaleTransform(
sx : float,sy : float,order : MatrixOrder);
パラメータ
- sx
x 軸方向に変換をスケーリングする量。 - sy
y 軸方向に変換をスケーリングする量。 - order
スケーリング行列を後に適用するか、前に適用するかを指定する MatrixOrder 列挙体。
戻り値
このメソッドは値を返しません。
使用例
[Visual Basic, C#] 次の例は、Windows フォームでの使用を意図してデザインされており、 Paint イベント ハンドラのパラメータである PaintEventArgs e が必要です。このコードは次のアクションを実行します。
- TextureBrush オブジェクトを作成します。
- テクスチャ イメージを x 方向に 2 倍スケーリングします。
- テクスチャ ブラシを使用して、画面上で四角形を塗りつぶします。
Public Sub ScaleTransform_Example(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
[C#]
public void ScaleTransform_Example(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);
}
[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.ScaleTransform オーバーロードの一覧