Pen.ResetTransform メソッド
アセンブリ: System.Drawing (system.drawing.dll 内)


次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub ResetTransform_Example(ByVal e As PaintEventArgs) ' Create a Pen object. Dim myPen As New Pen(Color.Black, 3) ' Scale the transformation matrix of myPen. myPen.ScaleTransform(2, 1) ' Draw a line with myPen. e.Graphics.DrawLine(myPen, 10, 0, 10, 200) ' Reset the transformation matrix of myPen to identity. myPen.ResetTransform() ' Draw a second line with myPen. e.Graphics.DrawLine(myPen, 100, 0, 100, 200) End Sub
public void ResetTransform_Example(PaintEventArgs e) { // Create a Pen object. Pen myPen = new Pen(Color.Black, 3); // Scale the transformation matrix of myPen. myPen.ScaleTransform(2, 1); // Draw a line with myPen. e.Graphics.DrawLine(myPen, 10, 0, 10, 200); // Reset the transformation matrix of myPen to identity. myPen.ResetTransform(); // Draw a second line with myPen. e.Graphics.DrawLine(myPen, 100, 0, 100, 200); }
public: void ResetTransform_Example( PaintEventArgs^ e ) { // Create a Pen object. Pen^ myPen = gcnew Pen( Color::Black,3.0f ); // Scale the transformation matrix of myPen. myPen->ScaleTransform( 2, 1 ); // Draw a line with myPen. e->Graphics->DrawLine( myPen, 10, 0, 10, 200 ); // Reset the transformation matrix of myPen to identity. myPen->ResetTransform(); // Draw a second line with myPen. e->Graphics->DrawLine( myPen, 100, 0, 100, 200 ); }
public void ResetTransform_Example(PaintEventArgs e) { // Create a Pen object. Pen myPen = new Pen(Color.get_Black(), 3); // Scale the transformation matrix of myPen. myPen.ScaleTransform(2, 1); // Draw a line with myPen. e.get_Graphics().DrawLine(myPen, 10, 0, 10, 200); // Reset the transformation matrix of myPen to identity. myPen.ResetTransform(); // Draw a second line with myPen. e.get_Graphics().DrawLine(myPen, 100, 0, 100, 200); } //ResetTransform_Example

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- Pen.ResetTransform メソッドのページへのリンク