# CorePixelDp

Artifact: [androidx.constraintlayout:constraintlayout-core](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/core/state/CorePixelDp.java+class:androidx.constraintlayout.core.state.CorePixelDp) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***


```
interface CorePixelDp
```

<br />

*** ** * ** ***

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CorePixelDp#toPixels(float)(dp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Convert dp to pixels |

## Public functions

### toPixels

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun toPixels(dp: Float): Float
```

Convert dp to pixels

| Parameters |
|---|---|
| `dp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the value in dip |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the value in pixels |