InProgressShapeRenderer


@ExperimentalInkCustomShapeWorkflowApi
interface InProgressShapeRenderer<InProgressShapeT : InProgressShape<*, *>>


Implement this interface to render an InProgressShape.

Summary

Public functions

Unit
draw(
    canvas: Canvas,
    shape: InProgressShapeT,
    strokeToScreenTransform: Matrix
)

Draw the given InProgressShape onto the provided Canvas, with the given transform.

Public functions

draw

Added in 1.0.0
fun draw(
    canvas: Canvas,
    shape: InProgressShapeT,
    strokeToScreenTransform: Matrix
): Unit

Draw the given InProgressShape onto the provided Canvas, with the given transform. This will typically be called on a separate render thread, but before Build.VERSION_CODES.Q, there is no separate render thread and the UI thread is used instead.

Parameters
canvas: Canvas

The Canvas to draw to.

shape: InProgressShapeT

The InProgressShape to draw.

strokeToScreenTransform: Matrix

A Matrix to transform the InProgressShape from its local coordinate space to the screen coordinate space.