draw

fun draw(canvas: Canvas?, x: Int, y: Int, paint: Paint?)

Draws Surface contents to canvas, with its top-left corner at (x, y).

If Paint paint is not null, apply ColorFilter, alpha, ImageFilter, and BlendMode.

Parameters

canvas

Canvas drawn into

x

horizontal offset in Canvas

y

vertical offset in Canvas

paint

Paint containing BlendMode, ColorFilter, ImageFilter, and so on; or null

See also


fun draw(canvas: Canvas?, x: Int, y: Int, samplingMode: SamplingMode, paint: Paint?)

Draws Surface contents to canvas, with its top-left corner at (x, y).

If Paint paint is not null, apply ColorFilter, alpha, ImageFilter, and BlendMode.

Parameters

canvas

Canvas drawn into

x

horizontal offset in Canvas

y

vertical offset in Canvas

sampling

what technique to use when sampling the surface pixels

paint

Paint containing BlendMode, ColorFilter, ImageFilter, and so on; or null

See also