Android.Graphics.Canvas.DrawBitmap Method
Draw the specified bitmap, scaling/translating automatically to fill the destination rectangle.

Syntax

[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_Landroid_graphics_Rect_Landroid_graphics_Rect_Landroid_graphics_Paint_Handler")]
public virtual void DrawBitmap (Bitmap bitmap, Rect src, Rect dst, Paint paint)

Parameters

bitmap
The bitmap to be drawn
src
May be null. The subset of the bitmap to be drawn
dst
The rectangle that the bitmap will be scaled/translated to fit into
paint
May be null. The paint used to draw the bitmap

Remarks

Draw the specified bitmap, scaling/translating automatically to fill the destination rectangle. If the source rectangle is not null, it specifies the subset of the bitmap to draw.

Note: if the paint contains a maskfilter that generates a mask which extends beyond the bitmap's original width/height (e.g. BlurMaskFilter), then the bitmap will be drawn as if it were in a Shader with CLAMP mode. Thus the color outside of the original width/height will be the edge color replicated.

This function ignores the density associated with the bitmap. This is because the source and destination rectangle coordinate spaces are in their respective densities, so must already have the appropriate scaling factor applied.

[Android Documentation]

Requirements

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