Android.Views.Surface.LockCanvas Method
Gets a Android.Graphics.Canvas for drawing into this surface.

Syntax

[Android.Runtime.Register("lockCanvas", "(Landroid/graphics/Rect;)Landroid/graphics/Canvas;", "GetLockCanvas_Landroid_graphics_Rect_Handler")]
public virtual Android.Graphics.Canvas LockCanvas (Android.Graphics.Rect dirty)

Parameters

inOutDirty
A rectangle that represents the dirty region that the caller wants to redraw. This function may choose to expand the dirty rectangle if for example the surface has been resized or if the previous contents of the surface were not available. The caller must redraw the entire dirty region as represented by the contents of the inOutDirty rectangle upon return from this function. The caller may also pass null instead, in the case where the entire surface should be redrawn.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionIf the inOutDirty rectangle is not valid.
!:NoType:android/view/Surface$OutOfResourcesException;Href=../../../reference/android/view/Surface.OutOfResourcesException.htmlIf the canvas cannot be locked.

Remarks

Gets a Android.Graphics.Canvas for drawing into this surface. After drawing into the provided Android.Graphics.Canvas, the caller must invoke Surface.UnlockCanvasAndPost(Android.Graphics.Canvas) to post the new contents to the surface.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1