as there are no dumb questions, what you prefer in Canvas in jetpack compose : dp.toPx() or f ;
eg:
Copy code
Offset(150.dp.toPx(), 150.dp.toPx())
or
Copy code
Offset(150f, 150f)
i like to use the former one as we have the real sense of how much lets say 100dp is.
d
David Breneisen
09/29/2024, 12:09 PM
Well those are different values entirely, but yes it’s almost always better to start with dp and then convert to pixels so you get a consistent result across densities