TextureBrush.RotateTransform Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Roda a transformação geométrica local deste TextureBrush objeto pela quantidade especificada. Este método antepõe a rotação à transformação.
Sobrecargas
| Name | Description |
|---|---|
| RotateTransform(Single) |
Roda a transformação geométrica local deste TextureBrush objeto pela quantidade especificada. Este método antepõe a rotação à transformação. |
| RotateTransform(Single, MatrixOrder) |
Roda a transformação geométrica local deste TextureBrush objeto pela quantidade especificada na ordem especificada. |
RotateTransform(Single)
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
Roda a transformação geométrica local deste TextureBrush objeto pela quantidade especificada. Este método antepõe a rotação à 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 seguinte foi concebido para uso com Windows Forms e requer PaintEventArgse, que é um parâmetro do handler de eventos Paint. O código executa as seguintes ações:
Cria um objeto TextureBrush.
Roda a imagem da 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
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
- Origem:
- TextureBrush.cs
Roda a transformação geométrica local deste TextureBrush objeto pela quantidade especificada 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 MatrixOrder enumeração que especifica se deve acrescentar ou antepender a matriz de rotação.
Exemplos
O exemplo seguinte foi concebido para uso com Windows Forms e requer PaintEventArgse, que é um parâmetro do handler de eventos Paint. O código executa as seguintes ações:
Cria um objeto TextureBrush.
Roda a imagem da 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