CompletedShapeRenderer
@ExperimentalInkCustomShapeWorkflowApi
interface CompletedShapeRenderer<CompletedShapeT : Any>
Called to render a CompletedShapeT instance to an android.graphics.Canvas.
Summary
Public functions |
|
|---|---|
open Boolean |
@UiThreadWhether calls to |
Unit |
@UiThreadDraw an instance of |
Public functions
changesWithTime
@UiThread
open fun changesWithTime(shape: CompletedShapeT): Boolean
Whether calls to draw with a new timestamp value results in different visual output. In other words, return true if and only if shape is animated.
draw
@UiThread
fun draw(
canvas: Canvas,
shape: CompletedShapeT,
strokeToScreenTransform: Matrix,
animatorClockStateMillis: Long
): Unit
Draw an instance of CompletedShapeT to a Canvas.
| Parameters | |
|---|---|
canvas: Canvas |
The output |
shape: CompletedShapeT |
The object to be drawn. |
strokeToScreenTransform: Matrix |
The full transform that has already been applied to the |
animatorClockStateMillis: Long |
The current timestamp to be used for animation calculations. Note that the animation timing may not proceed at the same rate as system elapsed time - it will by default, but may be paused and resumed, or sped up, or slowed down. |