[android-components](../../index.md) / [mozilla.components.support.ktx.android.util](../index.md) / [kotlin.Int](index.md) / [dpToPx](./dp-to-px.md)

# dpToPx

`fun `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`.dpToPx(displayMetrics: <ERROR CLASS>): <ERROR CLASS>` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/util/DisplayMetrics.kt#L19)

Converts a value in density independent pixels (dp) to the actual pixel values for the display.

