# StencilOperation

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/StencilOperation.kt+class:androidx.webgpu.StencilOperation) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
class StencilOperation
```

<br />

*** ** * ** ***

Defines the operation to perform on the stencil buffer.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#DecrementClamp() = 6` Decrements the stencil value, clamping at zero. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#DecrementWrap() = 8` Decrements the stencil value, wrapping on underflow. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#IncrementClamp() = 5` Increments the stencil value, clamping at the maximum. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#IncrementWrap() = 7` Increments the stencil value, wrapping on overflow. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#Invert() = 4` Inverts the bits of the stencil value. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#Keep() = 1` Keeps the current stencil value. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#Replace() = 3` Replaces the stencil value with the reference value. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#Undefined() = 0` Indicates that no stencil operation is specified. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#Zero() = 2` Sets the stencil value to zero. |

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/StencilOperation#toString(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### DecrementClamp

```
const val DecrementClamp = 6: Int
```

Decrements the stencil value, clamping at zero.

### DecrementWrap

```
const val DecrementWrap = 8: Int
```

Decrements the stencil value, wrapping on underflow.

### IncrementClamp

```
const val IncrementClamp = 5: Int
```

Increments the stencil value, clamping at the maximum.

### IncrementWrap

```
const val IncrementWrap = 7: Int
```

Increments the stencil value, wrapping on overflow.

### Invert

```
const val Invert = 4: Int
```

Inverts the bits of the stencil value.

### Keep

```
const val Keep = 1: Int
```

Keeps the current stencil value.

### Replace

```
const val Replace = 3: Int
```

Replaces the stencil value with the reference value.

### Undefined

```
const val Undefined = 0: Int
```

Indicates that no stencil operation is specified.

### Zero

```
const val Zero = 2: Int
```

Sets the stencil value to zero.

## Public companion functions

### toString

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
fun toString(value: Int): String
```