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


次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub ResetTransform_Example(ByVal e As PaintEventArgs) ' Create a TextureBrush object. Dim tBrush As New TextureBrush(New Bitmap("texture.jpg")) ' Rotate the texture image by 90 degrees. tBrush.RotateTransform(90) ' Fill a rectangle with tBrush. e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100) ' Reset transformation matrix to identity. tBrush.ResetTransform() ' Fill a rectangle with tBrush. e.Graphics.FillRectangle(tBrush, 0, 110, 100, 100) End Sub 'ResetTransform_Example.
public void ResetTransform_Example(PaintEventArgs e) { // Create a TextureBrush object. TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg")); // Rotate the texture image by 90 degrees. tBrush.RotateTransform(90); // Fill a rectangle with tBrush. e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100); // Reset transformation matrix to identity. tBrush.ResetTransform(); // Fill a rectangle with tBrush. e.Graphics.FillRectangle(tBrush, 0, 110, 100, 100); }
void ResetTransform_Example( PaintEventArgs^ e ) { // Create a TextureBrush object. TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) ); // Rotate the texture image by 90 degrees. tBrush->RotateTransform( 90 ); // Fill a rectangle with tBrush. e->Graphics->FillRectangle( tBrush, 0, 0, 100, 100 ); // Reset transformation matrix to identity. tBrush->ResetTransform(); // Fill a rectangle with tBrush. e->Graphics->FillRectangle( tBrush, 0, 110, 100, 100 ); }
public void ResetTransform_Example(PaintEventArgs e) { // Create a TextureBrush object. TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg")); // Rotate the texture image by 90 degrees. tBrush.RotateTransform(90); // Fill a rectangle with tBrush. e.get_Graphics().FillRectangle(tBrush, 0, 0, 100, 100); // Reset transformation matrix to identity. tBrush.ResetTransform(); // Fill a rectangle with tBrush. e.get_Graphics().FillRectangle(tBrush, 0, 110, 100, 100); } //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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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