iOSGraphics.Translate

From Xojo Documentation

Method

iOSGraphics.Translate(translateX As Double, translateY As Double)

Supported on Mobile (iOS).

Translates the origin point by the specified translateX and translateY values. Useful with Rotate.

Sample Code

From within an iOSCanvas.Paint event handler:

// Rotate square in center of graphics area
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)