Graphics.RotateTransform Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen döndürmeyi bu Graphicsöğesinin dönüştürme matrisine uygular.
Aşırı Yüklemeler
RotateTransform(Single) |
Belirtilen döndürmeyi bu Graphicsöğesinin dönüştürme matrisine uygular. |
RotateTransform(Single, MatrixOrder) |
Belirtilen döndürmeyi, belirtilen sırada bunun Graphics dönüştürme matrisine uygular. |
RotateTransform(Single)
- 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 olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse
.Paint Kod aşağıdaki eylemleri gerçekleştirir:
Windows Formunun dünya dönüştürme matrisini vektöre göre çevirir (100, 0).
Dünya dönüşümünü 30 derecelik bir açıyla döndürerek döndürme matrisini dünya dönüşüm matrisine önceden ekler.
Mavi kalemle döndürülmüş, çevrilmiş bir elips ç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
RotateTransform(Single, MatrixOrder)
- 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 MatrixOrder matris dönüşümüne eklenip eklenmeyeceğini veya eklenip eklenmeyeceğini belirten numaralandırmanın üyesi.
Örnekler
Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse
.Paint Kod aşağıdaki eylemleri gerçekleştirir:
Windows Formunun dünya dönüştürme matrisini vektöre göre çevirir (100, 0).
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önüş matrisine göre dönüştürme matrisini Graphics parametresine order
göre önceden ekler veya ekler.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin