語言

TextureBrush.RotateTransform 方法

定義

旋轉該 TextureBrush 物件的局部幾何變換,旋轉指定大小。 此方法在轉換前先行旋轉。

多載

名稱 Description
RotateTransform(Single)

旋轉該 TextureBrush 物件的局部幾何變換,旋轉指定大小。 此方法在轉換前先行旋轉。

RotateTransform(Single, MatrixOrder)

將該 TextureBrush 物件的局部幾何變換以指定大小、指定順序旋轉。

RotateTransform(Single)

來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs

旋轉該 TextureBrush 物件的局部幾何變換,旋轉指定大小。 此方法在轉換前先行旋轉。

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

參數

angle
Single

旋轉角度。

範例

以下範例是為 Windows 表單設計,並需要 PaintEventArgse,這是事件處理器的 Paint 參數。 此程式碼會執行下列動作:

  • 建立 TextureBrush 物件。

  • 將貼圖影像旋轉 90 度。

  • 填滿一個長方形。

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

適用於

RotateTransform(Single, MatrixOrder)

來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs
來源:
TextureBrush.cs

將該 TextureBrush 物件的局部幾何變換以指定大小、指定順序旋轉。

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)

參數

angle
Single

旋轉角度。

order
MatrixOrder

一個 MatrixOrder 列舉,指定旋轉矩陣是要加置還是加置。

範例

以下範例是為 Windows 表單設計,並需要 PaintEventArgse,這是事件處理器的 Paint 參數。 此程式碼會執行下列動作:

  • 建立 TextureBrush 物件。

  • 將貼圖影像旋轉 90 度。

  • 填滿一個長方形。

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

適用於