# SurfaceDepthEffect

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/Surface.kt+class:androidx.xr.glimmer.SurfaceDepthEffect) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)


```
class SurfaceDepthEffect
```

<br />

*** ** * ** ***

Represents the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect` used by a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)` in different states.

Focused `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)`s with a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/SurfaceDepthEffect#focusedDepthEffect()` will have a higher zIndex set so they can draw their focused depth effect over siblings.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/SurfaceDepthEffect#SurfaceDepthEffect(androidx.xr.glimmer.DepthEffect,androidx.xr.glimmer.DepthEffect)( depthEffect: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect?, focusedDepthEffect: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect? )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/SurfaceDepthEffect#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/SurfaceDepthEffect#hashCode()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect?` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/SurfaceDepthEffect#depthEffect()` the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect` used when the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)` is in its default state (no other interactions are ongoing) |
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect?` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/SurfaceDepthEffect#focusedDepthEffect()` the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect` used when the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)` is focused |

## Public constructors

### SurfaceDepthEffect

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
SurfaceDepthEffect(
    depthEffect: DepthEffect?,
    focusedDepthEffect: DepthEffect?
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

## Public properties

### depthEffect

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val depthEffect: DepthEffect?
```

the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect` used when the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)` is in its default state (no other interactions are ongoing)

### focusedDepthEffect

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
val focusedDepthEffect: DepthEffect?
```

the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/DepthEffect` used when the `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)` is focused