Udostępnij za pośrednictwem


AnimatedVectorDrawable.Draw(Canvas) Method

Definition

Draws the AnimatedVectorDrawable into the given canvas.

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

Parameters

canvas
Canvas

The canvas to draw into

Attributes

Remarks

Draws the AnimatedVectorDrawable into the given canvas.

<strong>Note:</strong> Calling this method with a software canvas when the AnimatedVectorDrawable is being animated on RenderThread (for API 25 and later) may yield outdated result, as the UI thread is not guaranteed to be in sync with RenderThread on VectorDrawable's property changes during RenderThread animations.

Java documentation for android.graphics.drawable.AnimatedVectorDrawable.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