Graphics.ScaleTransform メソッド

名前 | 説明 |
---|---|
Graphics.ScaleTransform (Single, Single) | この Graphics の変換行列の前に指定したスケーリング操作を付加することによって、この変換行列にスケーリング操作を適用します。 |
Graphics.ScaleTransform (Single, Single, MatrixOrder) | この Graphics の変換行列に、指定したスケーリング操作を指定した順序で適用します。 |

Graphics.ScaleTransform メソッド (Single, Single, MatrixOrder)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As Graphics Dim sx As Single Dim sy As Single Dim order As MatrixOrder instance.ScaleTransform(sx, sy, order)

スケーリング操作では、変換行列と各要素が ( sx , sy , 1) の対角線行列を乗算します。このメソッドは、order パラメータに従って、Graphics の変換行列にスケーリング行列を前に付加または後に追加します。

次の例は、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); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Graphics.ScaleTransform メソッド (Single, Single)
アセンブリ: System.Drawing (system.drawing.dll 内)



次の例は、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); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からGraphics.ScaleTransformを検索する場合は、下記のリンクをクリックしてください。

- Graphics.ScaleTransformのページへのリンク