Canvas.Save Method

Definition

Overloads

Save()

Saves the current matrix and clip onto a private stack.

Save(SaveFlags)

Based on saveFlags, can save the current matrix and clip onto a private stack.

Save()

Saves the current matrix and clip onto a private stack.

[Android.Runtime.Register("save", "()I", "GetSaveHandler")]
public virtual int Save ();
[<Android.Runtime.Register("save", "()I", "GetSaveHandler")>]
abstract member Save : unit -> int
override this.Save : unit -> int

Returns

The value to pass to restoreToCount() to balance this save()

Attributes

Remarks

Saves the current matrix and clip onto a private stack.

Subsequent calls to translate,scale,rotate,skew,concat or clipRect, clipPath will all operate as usual, but when the balancing call to restore() is made, those calls will be forgotten, and the settings that existed before the save() will be reinstated.

Java documentation for android.graphics.Canvas.save().

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

Save(SaveFlags)

Based on saveFlags, can save the current matrix and clip onto a private stack.

[Android.Runtime.Register("save", "(I)I", "GetSave_IHandler")]
public virtual int Save (Android.Graphics.SaveFlags saveFlags);
[<Android.Runtime.Register("save", "(I)I", "GetSave_IHandler")>]
abstract member Save : Android.Graphics.SaveFlags -> int
override this.Save : Android.Graphics.SaveFlags -> int

Parameters

saveFlags
SaveFlags

flag bits that specify which parts of the Canvas state to save/restore

Returns

The value to pass to restoreToCount() to balance this save()

Attributes

Remarks

Based on saveFlags, can save the current matrix and clip onto a private stack. <p class="note"><strong>Note:</strong> if possible, use the parameter-less save(). It is simpler and faster than individually disabling the saving of matrix or clip with this method.

Subsequent calls to translate,scale,rotate,skew,concat or clipRect, clipPath will all operate as usual, but when the balancing call to restore() is made, those calls will be forgotten, and the settings that existed before the save() will be reinstated.

This member is deprecated. Use #save() instead.

Java documentation for android.graphics.Canvas.save(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