Aracılığıyla paylaş


TextureBrush.RotateTransform Yöntem

Tanım

Bu TextureBrush nesnenin yerel geometrik dönüştürmesini belirtilen miktarda döndürür. Bu yöntem dönüştürmeye döndürmenin başına ekler.

Aşırı Yüklemeler

RotateTransform(Single)

Bu TextureBrush nesnenin yerel geometrik dönüştürmesini belirtilen miktarda döndürür. Bu yöntem dönüştürmeye döndürmenin başına ekler.

RotateTransform(Single, MatrixOrder)

Bu TextureBrush nesnenin yerel geometrik dönüşümünün belirtilen sırada belirtilen miktarda döndürülmesi.

RotateTransform(Single)

Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs

Bu TextureBrush nesnenin yerel geometrik dönüştürmesini belirtilen miktarda döndürür. Bu yöntem dönüştürmeye döndürmenin başına ekler.

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

Parametreler

angle
Single

Dönüş açısı.

Örnekler

Aşağıdaki örnek, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin Paint bir parametresi olan gerektirir.PaintEventArgse Kod aşağıdaki eylemleri gerçekleştirir:

  • Bir TextureBrush nesnesi oluşturur.

  • Doku görüntüsünü 90 derece döndürür.

  • Dikdörtgeni doldurur.

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

Şunlara uygulanır

RotateTransform(Single, MatrixOrder)

Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs

Bu TextureBrush nesnenin yerel geometrik dönüşümünün belirtilen sırada belirtilen miktarda döndürülmesi.

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)

Parametreler

angle
Single

Dönüş açısı.

order
MatrixOrder

MatrixOrder Döndürme matrisinin eklenip eklenmeyeceğini veya eklenip eklenmeyeceğini belirten bir numaralandırma.

Örnekler

Aşağıdaki örnek, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin Paint bir parametresi olan gerektirir.PaintEventArgse Kod aşağıdaki eylemleri gerçekleştirir:

  • Bir TextureBrush nesnesi oluşturur.

  • Doku görüntüsünü 90 derece döndürür.

  • Dikdörtgeni doldurur.

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

Şunlara uygulanır