TextureBrush.RotateTransform Metoda

Definicja

Obraca lokalną transformację geometryczną tego TextureBrush obiektu o określoną kwotę. Ta metoda poprzedza rotację transformacji.

Przeciążenia

RotateTransform(Single)

Obraca lokalną transformację geometryczną tego TextureBrush obiektu o określoną kwotę. Ta metoda poprzedza rotację transformacji.

RotateTransform(Single, MatrixOrder)

Obraca lokalną transformację geometryczną tego TextureBrush obiektu o określoną kwotę w określonej kolejności.

RotateTransform(Single)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Obraca lokalną transformację geometryczną tego TextureBrush obiektu o określoną kwotę. Ta metoda poprzedza rotację transformacji.

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

Parametry

angle
Single

Kąt obrotu.

Przykłady

Poniższy przykład jest przeznaczony do użycia z Windows Forms i wymaga PaintEventArgseparametru Paint programu obsługi zdarzeń. Kod wykonuje następujące akcje:

  • Tworzy obiekt TextureBrush.

  • Obraca obraz tekstury o 90 stopni.

  • Wypełnia prostokąt.

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

Dotyczy

RotateTransform(Single, MatrixOrder)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Obraca lokalną transformację geometryczną tego TextureBrush obiektu o określoną kwotę w określonej kolejności.

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)

Parametry

angle
Single

Kąt obrotu.

order
MatrixOrder

Wyliczenie MatrixOrder określające, czy ma zostać dołączona lub wstępnie utworzona macierz rotacji.

Przykłady

Poniższy przykład jest przeznaczony do użycia z Windows Forms i wymaga PaintEventArgseparametru Paint programu obsługi zdarzeń. Kod wykonuje następujące akcje:

  • Tworzy obiekt TextureBrush.

  • Obraca obraz tekstury o 90 stopni.

  • Wypełnia prostokąt.

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

Dotyczy