# Drag2DScope

# Drag2DScope

Artifact:[androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation)  
[View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/gestures/Draggable2D.kt+class:androidx.compose.foundation.gestures.Drag2DScope)  
Added in[1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)
Common/AllAndroid/JVM
  - Cmn  

  ```
  interface Drag2DScope
  ```

*** ** * ** ***

Scope used for suspending drag blocks

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [dragBy](https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/Drag2DScope#dragBy(androidx.compose.ui.geometry.Offset))`(pixels: `[Offset](https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)`)` Attempts to drag by[pixels](https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/Drag2DScope#dragBy(androidx.compose.ui.geometry.Offset))px. | Cmn |

## Public functions

### dragBy

Cmn  
Added in[1.10.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.10.0-rc01)  

```
fun dragBy(pixels: Offset): Unit
```

Attempts to drag by[pixels](https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/Drag2DScope#dragBy(androidx.compose.ui.geometry.Offset))px.