Graphics.RotateTransform Method (Single)
Applies the specified rotation to the transformation matrix of this Graphics.
Assembly: System.Drawing (in System.Drawing.dll)
The rotation operation consists of multiplying the transformation matrix by a matrix whose elements are derived from the angle parameter. This method applies the rotation by prepending it to the transformation matrix.
Translates the world transformation matrix of the Windows Form by the vector (100, 0).
Rotates the world transformation by an angle of 30 degrees, prepending the rotation matrix to the world transformation matrix.
Draws a rotated, translated ellipse with a blue pen.
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
Available since 1.1