TextureBrush.RotateTransform メソッド

定義

指定した量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換を回転します。 このメソッドは変換の前に回転を行います。

オーバーロード

RotateTransform(Single)

指定した量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換を回転します。 このメソッドは変換の前に回転を行います。

RotateTransform(Single, MatrixOrder)

指定した順序で、指定した量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換を回転します。

RotateTransform(Single)

ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs

指定した量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換を回転します。 このメソッドは変換の前に回転を行います。

public:
 void RotateTransform(float angle);
public void RotateTransform (float angle);
member this.RotateTransform : single -> unit
Public Sub RotateTransform (angle As Single)

パラメーター

angle
Single

回転角度。

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

  • TextureBrush オブジェクトを作成します。

  • テクスチャ イメージを 90 度回転させます。

  • 四角形を塗りつぶします。

void RotateTransform_Example1( 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 );
}
public void RotateTransform_Example1(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);
}
Public Sub RotateTransform_Example1(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)
End Sub

適用対象

RotateTransform(Single, MatrixOrder)

ソース:
TextureBrush.cs
ソース:
TextureBrush.cs
ソース:
TextureBrush.cs

指定した順序で、指定した量だけこの TextureBrush オブジェクトのローカル ジオメトリック変換を回転します。

public:
 void RotateTransform(float angle, System::Drawing::Drawing2D::MatrixOrder order);
public void RotateTransform (float angle, System.Drawing.Drawing2D.MatrixOrder order);
member this.RotateTransform : single * System.Drawing.Drawing2D.MatrixOrder -> unit
Public Sub RotateTransform (angle As Single, order As MatrixOrder)

パラメーター

angle
Single

回転角度。

order
MatrixOrder

回転行列を後に適用するか、前に適用するかを指定する MatrixOrder 列挙値。

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

  • TextureBrush オブジェクトを作成します。

  • テクスチャ イメージを 90 度回転させます。

  • 四角形を塗りつぶします。

void RotateTransform_Example2( PaintEventArgs^ e )
{
   // Create a TextureBrush object.
   TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );

   // Rotate the texture image by 90 degrees.
   tBrush->RotateTransform( 90, MatrixOrder::Prepend );

   // Fill a rectangle with tBrush.
   e->Graphics->FillRectangle( tBrush, 0, 0, 100, 100 );
}
public void RotateTransform_Example2(PaintEventArgs e)
{
             
    // Create a TextureBrush object.
    TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
             
    // Rotate the texture image by 90 degrees.
    tBrush.RotateTransform(90, MatrixOrder.Prepend);
             
    // Fill a rectangle with tBrush.
    e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100);
}
Public Sub RotateTransform_Example2(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, MatrixOrder.Prepend)

    ' Fill a rectangle with tBrush.
    e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100)
End Sub

適用対象