From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Rotates the drawing context by the specified angle (in radians) around the origin point (usually 0,0). This only affects subsequent drawing. Any drawing done before the Rotate method call is not rotated.
Rotates the drawing context at the x and y coordinates by the specified angle (in radians). This only affects subsequent drawing. Any drawing done before the Rotate method called is not rotated.
Use Translate to move the origin.
From within an iOSCanvas.Paint event handler:
Const Pi = 3.14159
g.Translate(g.Width / 2, g.Height / 2)
g.Rotate(Pi / 4) // 45 degrees or 1/8 of a circle
g.FillColor = Color.Blue
g.FillRect(10, 10, 50, 50)