TextureBrush.RotateTransform Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Otočí místní geometrické transformace tohoto TextureBrush objektu o zadanou hodnotu. Tato metoda předečí otočení na transformaci.
Přetížení
RotateTransform(Single) |
Otočí místní geometrické transformace tohoto TextureBrush objektu o zadanou hodnotu. Tato metoda předečí otočení na transformaci. |
RotateTransform(Single, MatrixOrder) |
Otočí místní geometrické transformace tohoto TextureBrush objektu o zadanou hodnotu v zadaném pořadí. |
RotateTransform(Single)
- Zdroj:
- TextureBrush.cs
- Zdroj:
- TextureBrush.cs
- Zdroj:
- TextureBrush.cs
Otočí místní geometrické transformace tohoto TextureBrush objektu o zadanou hodnotu. Tato metoda předečí otočení na transformaci.
public:
void RotateTransform(float angle);
public void RotateTransform (float angle);
member this.RotateTransform : single -> unit
Public Sub RotateTransform (angle As Single)
Parametry
- angle
- Single
Úhel otáčení.
Příklady
Následující příklad je určený pro použití s model Windows Forms a vyžaduje PaintEventArgse
, což je parametr obslužné rutiny Paint
události. Kód provede následující akce:
TextureBrush Vytvoří objekt.
Otočí obrázek textury o 90 stupňů.
Vyplní obdélník.
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
Platí pro
RotateTransform(Single, MatrixOrder)
- Zdroj:
- TextureBrush.cs
- Zdroj:
- TextureBrush.cs
- Zdroj:
- TextureBrush.cs
Otočí místní geometrické transformace tohoto TextureBrush objektu o zadanou hodnotu v zadaném pořadí.
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
Úhel otáčení.
- order
- MatrixOrder
Výčtu MatrixOrder , který určuje, zda se má připojit nebo předem nastavit matici otáčení.
Příklady
Následující příklad je určený pro použití s model Windows Forms a vyžaduje PaintEventArgse
, což je parametr obslužné rutiny Paint
události. Kód provede následující akce:
TextureBrush Vytvoří objekt.
Otočí obrázek textury o 90 stupňů.
Vyplní obdélník.
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
Platí pro
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro