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

Dim instance As Graphics Dim dx As Single Dim dy As Single Dim order As MatrixOrder instance.TranslateTransform(dx, dy, order)

平行移動操作では、変換行列と平行移動部が dx パラメータおよび dy パラメータである行列を乗算します。このメソッドは、order パラメータに従って、Graphics の平行移動行列に変換行列を前に付加または後に追加します。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
-
Windows フォームのワールド変換行列を 30.0F 度回転します。
-
TranslateTransform を呼び出し、平行移動をワールド変換行列の後に追加することによって、グラフィックス オブジェクトの原点を移動します。
Public Sub TranslateTransformAngleMatrixOrder(ByVal e As PaintEventArgs) ' Set world transform of graphics object to rotate. e.Graphics.RotateTransform(30.0F) ' Then to translate, appending to world transform. e.Graphics.TranslateTransform(100.0F, 0.0F, MatrixOrder.Append) ' Draw rotated, translated ellipse to screen. e.Graphics.DrawEllipse(New Pen(Color.Blue, 3), 0, 0, 200, 80) End Sub
public void TranslateTransformAngleMatrixOrder(PaintEventArgs e) { // Set world transform of graphics object to rotate. e.Graphics.RotateTransform(30.0F); // Then to translate, appending to world transform. e.Graphics.TranslateTransform(100.0F, 0.0F, MatrixOrder.Append); // Draw rotated, translated ellipse to screen. e.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80); }

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.TranslateTransform メソッド (Single, Single)
アセンブリ: System.Drawing (system.drawing.dll 内)


通常、原点は、描画サーフェイスの左上隅です。平行移動操作では、変換行列と平行移動部が dx パラメータおよび dy パラメータである行列を乗算します。このメソッドは、平行移動行列を変換行列の前に付加することによって、その平行移動を適用します。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
-
Windows フォームのワールド変換行列を 30.0F 度回転します。
-
TranslateTransform を呼び出し、平行移動を変換行列の前に付加することによって、グラフィックス オブジェクトの原点を移動します。
Public Sub TranslateTransformAngle(ByVal e As PaintEventArgs) ' Set world transform of graphics object to rotate. e.Graphics.RotateTransform(30.0F) ' Then to translate, prepending to world transform. e.Graphics.TranslateTransform(100.0F, 0.0F) ' Draw translated, rotated ellipse to screen. e.Graphics.DrawEllipse(New Pen(Color.Blue, 3), 0, 0, 200, 80) End Sub
public void TranslateTransformAngle(PaintEventArgs e) { // Set world transform of graphics object to rotate. e.Graphics.RotateTransform(30.0F); // Then to translate, prepending to world transform. e.Graphics.TranslateTransform(100.0F, 0.0F); // Draw translated, rotated ellipse to screen. e.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80); }

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.TranslateTransform メソッド
Weblioに収録されているすべての辞書からGraphics.TranslateTransformを検索する場合は、下記のリンクをクリックしてください。

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