iOSGraphics.RestoreState

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

iOSGraphics.RestoreState()

Supported on Mobile(iOS).

Restores graphics context previously saved with SaveState.

Sample Code

From within an iOSCanvas.Paint event handler:

g.FillColor = Color.Blue
g.FillRect(10, 10, 20, 20)

g.SaveState
g.FillColor = Color.Red
g.FillRect(50, 50, 20, 20)

// Restore to state where FillColor is Blue
g.RestoreState
g.FillRect(10, 50, 20, 20)