drawDrawable

fun drawDrawable(drawable: Drawable): Canvas

Draws Drawable drawable using clip and matrix.

If Canvas has an asynchronous implementation, as is the case when it is recording into Picture, then drawable will be referenced, so that Drawable::draw() can be called when the operation is finalized. To force immediate drawing, call Drawable::draw() instead.

Return

this

Parameters

drawable

custom struct encapsulating drawing commands


fun drawDrawable(drawable: Drawable, x: Float, y: Float): Canvas

Draws Drawable drawable using clip and matrix, offset by (x, y).

If Canvas has an asynchronous implementation, as is the case when it is recording into Picture, then drawable will be referenced, so that Drawable::draw() can be called when the operation is finalized. To force immediate drawing, call Drawable::draw() instead.

Return

this

Parameters

drawable

custom struct encapsulating drawing commands

x

offset into Canvas writable pixels on x-axis

y

offset into Canvas writable pixels on y-axis

See also


fun drawDrawable(drawable: Drawable, matrix: Matrix33?): Canvas

Draws Drawable drawable using clip and matrix, concatenated with optional matrix.

If Canvas has an asynchronous implementation, as is the case when it is recording into Picture, then drawable will be referenced, so that Drawable::draw() can be called when the operation is finalized. To force immediate drawing, call Drawable::draw() instead.

Return

this

Parameters

drawable

custom struct encapsulating drawing commands

matrix

transformation applied to drawing; may be null

See also