title: How to convert Dp to pixels in Android Jetpack Compose?
body: <p>Most of Jetpack Compose API uses <a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp" rel="noreferrer">Dp</a> as a dimensions unit, but sometimes a pixel value is required. How can I convert a dp value to px? Just for an example there's <a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#graphicslayer" rel="noreferrer">graphicsLayer()</a> modifier that accepts <code>translationX/Y</code> arguments in pixels.</p>