Graphics.ScaleTransformとは? わかりやすく解説

Graphics.ScaleTransform メソッド


Graphics.ScaleTransform メソッド (Single, Single, MatrixOrder)

この Graphics変換行列に、指定したスケーリング操作指定した順序適用します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub ScaleTransform ( _
    sx As Single, _
    sy As Single, _
    order As MatrixOrder _
)
Dim instance As Graphics
Dim sx As Single
Dim sy As Single
Dim order As MatrixOrder

instance.ScaleTransform(sx, sy, order)
public void ScaleTransform (
    float sx,
    float sy,
    MatrixOrder order
)
public:
void ScaleTransform (
    float sx, 
    float sy, 
    MatrixOrder order
)
public void ScaleTransform (
    float sx, 
    float sy, 
    MatrixOrder order
)
public function ScaleTransform (
    sx : float, 
    sy : float, 
    order : MatrixOrder
)

パラメータ

sx

x 方向スケール ファクタ

sy

y 方向スケール ファクタ

order

スケーリング操作変換行列前に付加される後ろ追加されるかを指定する MatrixOrder 列挙体のメンバ

解説解説
使用例使用例

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

平行四辺形生成されます。

Public Sub ScaleTransformFloatMatrixOrder(ByVal
 e As PaintEventArgs)

    ' Set world transform of graphics object to rotate.
    e.Graphics.RotateTransform(30.0F)

    ' Then to scale, appending to world transform.
    e.Graphics.ScaleTransform(3.0F, 1.0F, MatrixOrder.Append)

    ' Draw rotated, scaled rectangle to screen.
    e.Graphics.DrawRectangle(New Pen(Color.Blue, 3), 50, 0, 100,
 40)
End Sub
public void ScaleTransformFloatMatrixOrder(PaintEventArgs
 e)
{

    // Set world transform of graphics object to rotate.
    e.Graphics.RotateTransform(30.0F);

    // Then to scale, appending to world transform.
    e.Graphics.ScaleTransform(3.0F, 1.0F, MatrixOrder.Append);

    // Draw rotated, scaled rectangle to screen.
    e.Graphics.DrawRectangle(new Pen(Color.Blue, 3), 50, 0, 100,
 40);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.ScaleTransform メソッド (Single, Single)

この Graphics変換行列前に指定したスケーリング操作付加することによって、この変換行列スケーリング操作適用します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub ScaleTransform ( _
    sx As Single, _
    sy As Single _
)
Dim instance As Graphics
Dim sx As Single
Dim sy As Single

instance.ScaleTransform(sx, sy)
public void ScaleTransform (
    float sx,
    float sy
)
public:
void ScaleTransform (
    float sx, 
    float sy
)
public void ScaleTransform (
    float sx, 
    float sy
)
public function ScaleTransform (
    sx : float, 
    sy : float
)

パラメータ

sx

x 方向スケール ファクタ

sy

y 方向スケール ファクタ

解説解説
使用例使用例

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

四角形のままです。

Public Sub ScaleTransformFloat(ByVal
 e As PaintEventArgs)

    ' Set world transform of graphics object to rotate.
    e.Graphics.RotateTransform(30.0F)

    ' Then to scale, prepending to world transform.
    e.Graphics.ScaleTransform(3.0F, 1.0F)

    ' Draw scaled, rotated rectangle to screen.
    e.Graphics.DrawRectangle(New Pen(Color.Blue, 3), 50, 0, 100,
 40)
End Sub
public void ScaleTransformFloat(PaintEventArgs
 e)
{

    // Set world transform of graphics object to rotate.
    e.Graphics.RotateTransform(30.0F);

    // Then to scale, prepending to world transform.
    e.Graphics.ScaleTransform(3.0F, 1.0F);

    // Draw scaled, rotated rectangle to screen.
    e.Graphics.DrawRectangle(new Pen(Color.Blue, 3), 50, 0, 100,
 40);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Graphics.ScaleTransform」の関連用語

Graphics.ScaleTransformのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Graphics.ScaleTransformのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS