Sdílet prostřednictvím


View.Draw(Canvas) Method

Definition

Manually render this view (and all of its children) to the given Canvas.

[Android.Runtime.Register("draw", "(Landroid/graphics/Canvas;)V", "GetDraw_Landroid_graphics_Canvas_Handler")]
public virtual void Draw (Android.Graphics.Canvas canvas);
[<Android.Runtime.Register("draw", "(Landroid/graphics/Canvas;)V", "GetDraw_Landroid_graphics_Canvas_Handler")>]
abstract member Draw : Android.Graphics.Canvas -> unit
override this.Draw : Android.Graphics.Canvas -> unit

Parameters

canvas
Canvas

The Canvas to which the View is rendered.

Attributes

Remarks

Manually render this view (and all of its children) to the given Canvas. The view must have already done a full layout before this function is called. When implementing a view, implement #onDraw(android.graphics.Canvas) instead of overriding this method. If you do need to override this method, call the superclass version.

Java documentation for android.view.View.draw(android.graphics.Canvas).

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