Graphics.RotateTransform Yöntem

Tanım

Belirtilen döndürmeyi bu Graphicsöğesinin dönüştürme matrisine uygular.

Aşırı Yüklemeler

Name Description
RotateTransform(Single, MatrixOrder)

Belirtilen döndürmeyi, belirtilen sırada bunun Graphics dönüştürme matrisine uygular.

RotateTransform(Single)

Belirtilen döndürmeyi bu Graphicsöğesinin dönüştürme matrisine uygular.

RotateTransform(Single, MatrixOrder)

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen döndürmeyi, belirtilen sırada bunun Graphics dönüştürme matrisine uygular.

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)

Parametreler

angle
Single

Derece cinsinden döndürme açısı.

order
MatrixOrder

Döndürmenin matris dönüşümüne MatrixOrder eklenip eklenmeyeceğini veya matris dönüşümüne eklenip eklenmeyeceğini belirten sabit listesi üyesi.

Örnekler

Aşağıdaki kod örneği Windows Forms ile kullanılmak üzere tasarlanmıştır ve PaintEventArgs olay işleyicisinin bir parametresi olan ePaint gerektirir. Kod aşağıdaki eylemleri gerçekleştirir:

  • Windows Formunun dünya dönüştürme matrisini vektöre (100, 0) çevirir.

  • Döndürme matrisini ile dünya dönüşüm matrisine ekleyerek dünya dönüşümünü 30 derecelik bir açıyla Appenddöndürür.

  • Mavi kalemle çevrilmiş, döndürülmüş bir elips çizer.

public:
   void RotateTransformAngleMatrixOrder( PaintEventArgs^ e )
   {
      // Set world transform of graphics object to translate.
      e->Graphics->TranslateTransform( 100.0F, 0.0F );

      // Then to rotate, appending rotation matrix.
      e->Graphics->RotateTransform( 30.0F, MatrixOrder::Append );

      // Draw translated, rotated ellipse to screen.
      e->Graphics->DrawEllipse( gcnew Pen( Color::Blue,3.0f ), 0, 0, 200, 80 );
   }
private void RotateTransformAngleMatrixOrder(PaintEventArgs e)
{

    // Set world transform of graphics object to translate.
    e.Graphics.TranslateTransform(100.0F, 0.0F);

    // Then to rotate, appending rotation matrix.
    e.Graphics.RotateTransform(30.0F, MatrixOrder.Append);

    // Draw translated, rotated ellipse to screen.
    e.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80);
}
Private Sub RotateTransformAngleMatrixOrder(ByVal e As PaintEventArgs)

    ' Set world transform of graphics object to translate.
    e.Graphics.TranslateTransform(100.0F, 0.0F)

    ' Then to rotate, appending rotation matrix.
    e.Graphics.RotateTransform(30.0F, MatrixOrder.Append)

    ' Draw translated, rotated ellipse to screen.
    e.Graphics.DrawEllipse(New Pen(Color.Blue, 3), 0, 0, 200, 80)
End Sub

Açıklamalar

Döndürme işlemi, dönüştürme matrisinin, öğeleri parametresinden türetilen bir matrisle çarpılmasından angle oluşur. Bu yöntem, döndürme matrisine göre dönüştürme matrisini Graphics parametresine order göre ekler veya ekler.

Şunlara uygulanır

RotateTransform(Single)

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen döndürmeyi bu Graphicsöğesinin dönüştürme matrisine uygular.

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

Parametreler

angle
Single

Derece cinsinden döndürme açısı.

Örnekler

Aşağıdaki kod örneği Windows Forms ile kullanılmak üzere tasarlanmıştır ve PaintEventArgs olay işleyicisinin bir parametresi olan ePaint gerektirir. Kod aşağıdaki eylemleri gerçekleştirir:

  • Windows Formunun dünya dönüştürme matrisini vektöre (100, 0) çevirir.

  • Dünya dönüşümünü 30 derecelik bir açıyla döndürerek döndürme matrisini dünya dönüşüm matrisine çıkarır.

  • Mavi kalemle döndürülmüş, çevrilmiş bir üç nokta çizer.

public:
   void RotateTransformAngle( PaintEventArgs^ e )
   {
      // Set world transform of graphics object to translate.
      e->Graphics->TranslateTransform( 100.0F, 0.0F );

      // Then to rotate, prepending rotation matrix.
      e->Graphics->RotateTransform( 30.0F );

      // Draw rotated, translated ellipse to screen.
      e->Graphics->DrawEllipse( gcnew Pen( Color::Blue,3.0f ), 0, 0, 200, 80 );
   }
private void RotateTransformAngle(PaintEventArgs e)
{

    // Set world transform of graphics object to translate.
    e.Graphics.TranslateTransform(100.0F, 0.0F);

    // Then to rotate, prepending rotation matrix.
    e.Graphics.RotateTransform(30.0F);

    // Draw rotated, translated ellipse to screen.
    e.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80);
}
Private Sub RotateTransformAngle(ByVal e As PaintEventArgs)

    ' Set world transform of graphics object to translate.
    e.Graphics.TranslateTransform(100.0F, 0.0F)

    ' Then to rotate, prepending rotation matrix.
    e.Graphics.RotateTransform(30.0F)

    ' Draw rotated, translated ellipse to screen.
    e.Graphics.DrawEllipse(New Pen(Color.Blue, 3), 0, 0, 200, 80)
End Sub

Açıklamalar

Döndürme işlemi, dönüştürme matrisinin, öğeleri parametresinden türetilen bir matrisle çarpılmasından angle oluşur. Bu yöntem dönüştürme matrisine önceden uygulayarak döndürmeyi uygular.

Şunlara uygulanır