Adam Bennett
04/11/2020, 9:11 AMCanvas
using Compose? I'm looking to do this
override fun onDraw(canvas: Canvas?) {
super.onDraw(canvas)
calculatePropagation()
canvas?.let { render() }
postInvalidateDelayed(20)
}
But I can't seem to find an equivalent for repeatedly drawing to Canvas. I've done a tonne of digging through docs and on here - can anyone chime in?Bacho Kurtanidze
04/11/2020, 11:15 AMfun Modifier.drawBehind(
onDraw: Density.(canvas: Canvas, size: PxSize) -> Unit
) = this + DrawBackgroundModifier(onDraw)
Bacho Kurtanidze
04/11/2020, 11:15 AMAdam Bennett
04/11/2020, 11:21 AMAdam Bennett
04/11/2020, 11:29 AMBacho Kurtanidze
04/11/2020, 11:35 AMAdam Bennett
04/11/2020, 11:52 AMAdam Bennett
04/11/2020, 11:52 AMTimo Drick
04/11/2020, 11:58 AMBacho Kurtanidze
04/11/2020, 12:11 PMAdam Powell
04/11/2020, 1:36 PMCanvas
composable function that will take up some layout space for you to draw into. You should separate the time pulse code from your drawing code though.Adam Powell
04/11/2020, 1:37 PMAdam Bennett
04/11/2020, 1:44 PMAdam Powell
04/12/2020, 1:40 PMAdam Bennett
04/12/2020, 2:09 PMAdam Powell
04/12/2020, 2:56 PMAdam Powell
04/12/2020, 2:57 PMAdam Bennett
04/12/2020, 3:42 PMAdam Powell
04/12/2020, 4:15 PMAdam Powell
04/12/2020, 4:16 PMAdam Bennett
04/12/2020, 4:19 PMAdam Powell
04/12/2020, 4:27 PMAdam Bennett
04/12/2020, 4:29 PM