onDraw

protected abstract fun onDraw(canvas: CanvasBuffer)

The draw method is called to actually draw the ui element visual representation to the CanvasBuffer

Override this function when creating a custom ui element that required direct drawing on the canvas

Note: the UI element transformations & animation were already evaluated, so it is recommended not to change the Animator or to perform transformations (like scale) within the onDraw method

Parameters

canvas

the CanvasBuffer for drawing the required information

See also