TextureBrush.RotateTransform Método

Definição

Gira a transformação geométrica local desse objeto TextureBrush no valor especificado. Esse método precede a rotação para a transformação.

Sobrecargas

RotateTransform(Single)

Gira a transformação geométrica local desse objeto TextureBrush no valor especificado. Esse método precede a rotação para a transformação.

RotateTransform(Single, MatrixOrder)

Gira a transformação geométrica local desse objeto TextureBrush no valor especificado na ordem especificada.

RotateTransform(Single)

Origem:
TextureBrush.cs
Origem:
TextureBrush.cs
Origem:
TextureBrush.cs

Gira a transformação geométrica local desse objeto TextureBrush no valor especificado. Esse método precede a rotação para a transformação.

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

Parâmetros

angle
Single

O ângulo de rotação.

Exemplos

O exemplo a seguir foi projetado para uso com Windows Forms e requer PaintEventArgse, que é um parâmetro do Paint manipulador de eventos. O código executa as seguintes ações:

  • Cria um objeto TextureBrush.

  • Gira a imagem de textura em 90 graus.

  • Preenche um retângulo.

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

Aplica-se a

RotateTransform(Single, MatrixOrder)

Origem:
TextureBrush.cs
Origem:
TextureBrush.cs
Origem:
TextureBrush.cs

Gira a transformação geométrica local desse objeto TextureBrush no valor especificado na ordem especificada.

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)

Parâmetros

angle
Single

O ângulo de rotação.

order
MatrixOrder

Uma enumeração MatrixOrder que especifica se a matriz de rotação deve ser acrescentada ou precedida.

Exemplos

O exemplo a seguir foi projetado para uso com Windows Forms e requer PaintEventArgse, que é um parâmetro do Paint manipulador de eventos. O código executa as seguintes ações:

  • Cria um objeto TextureBrush.

  • Gira a imagem de textura em 90 graus.

  • Preenche um retângulo.

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

Aplica-se a