If im using `Canvas` composable i have access to i...
# compose
r
If im using
Canvas
composable i have access to its size inside
DrawScope
. I want to use this size to create
Path
and then clip it out. However, i shouldn’t allocate Path object there, right? So i want to use
remember
, but i can’t in
DrawScope
. Am i missing something, or the only way to do this is to measure constraints outside of Canvas, create Path with remember, and then use it inside DrawScope?
👀 1
d
Basically yeah. You use remember and Ref. That'll let you create it in the draw scope.