Travis Griggs
10/19/2023, 8:47 PMpainterResource(<http://R.drawable.my|R.drawable.my>_resource)
Is it possible to get any sizing info about the resource? In particular, I want to know the aspect ratio of width / height (so I don't really care what units the width|height would be)ascii
10/19/2023, 8:55 PM.intrinsicSize
should get you there. The only two possibilities for a painter resource would be bitmap or vector I think, and both BitmapPainter
and VectorPainter
would return a proper size, not Size.Unspecifiedephemient
10/19/2023, 8:58 PMandroidx.compose.ui.res.painterResource()
only supports bitmap and vector drawables, which are finite sized