Språk

Picture.BeginRecording(Int32, Int32) Method

Definition

To record a picture, call beginRecording() and then draw into the Canvas that is returned.

[Android.Runtime.Register("beginRecording", "(II)Landroid/graphics/Canvas;", "GetBeginRecording_IIHandler")]
public virtual Android.Graphics.Canvas BeginRecording(int width, int height);
[<Android.Runtime.Register("beginRecording", "(II)Landroid/graphics/Canvas;", "GetBeginRecording_IIHandler")>]
abstract member BeginRecording : int * int -> Android.Graphics.Canvas
override this.BeginRecording : int * int -> Android.Graphics.Canvas

Parameters

width
Int32

The recording width supplied to the native picture recorder.

height
Int32

The recording height supplied to the native picture recorder.

Returns

A canvas that records commands into this picture until EndRecording() is called.

Attributes

Remarks

To record a picture, call beginRecording() and then draw into the Canvas that is returned. Nothing we appear on screen, but all of the draw commands (e.g. Canvas#drawRect(Rect, Paint)) will be recorded. To stop recording, call endRecording(). After endRecording() the Canvas that was returned must no longer be used, and nothing should be drawn into it.

Java documentation for android.graphics.Picture.beginRecording(int, 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