Gets an object that will restore to the current transform state when disposed.
Eto (in Eto.dll) Version: 2.4.0
public IDisposable SaveTransformState()
Public Function SaveTransformState As IDisposable
member SaveTransformState : unit -> IDisposable
[Missing <returns> documentation for "M:Eto.Drawing.Graphics.SaveTransformState"]
This saves the current transform state that can be changed by any of the transform calls.
This is useful when calling into untrusted code that can leave the transform unbalanced.
It also ensures that RestoreTransform() requires a matching SaveTransform(), until the return value is disposed.
Disposing the return value guarantees that the transform state is restored to when this method was called.
This example shows how you can reliably restore state in a code block: