Dela via


Canvas.RestoreToCount(Int32) Method

Definition

Efficient way to pop any calls to save() that happened after the save count reached saveCount.

[Android.Runtime.Register("restoreToCount", "(I)V", "GetRestoreToCount_IHandler")]
public virtual void RestoreToCount (int saveCount);
[<Android.Runtime.Register("restoreToCount", "(I)V", "GetRestoreToCount_IHandler")>]
abstract member RestoreToCount : int -> unit
override this.RestoreToCount : int -> unit

Parameters

saveCount
Int32

The save level to restore to.

Attributes

Remarks

Efficient way to pop any calls to save() that happened after the save count reached saveCount. It is an error for saveCount to be less than 1.

Example: int count = canvas.save(); ... // more calls potentially to save() canvas.restoreToCount(count); // now the canvas is back in the same state it was before the initial // call to save().

Java documentation for android.graphics.Canvas.restoreToCount(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to