# 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)

*** ** * ** ***


```
public final class StencilOperation
```

<br />

*** ** * ** ***

Defines the operation to perform on the stencil buffer.

## Summary

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

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/webgpu/StencilOperation#toString(kotlin.Int)(int value)` |

## Constants

### DecrementClamp

```
public static final int DecrementClamp = 6
```

Decrements the stencil value, clamping at zero.

### DecrementWrap

```
public static final int DecrementWrap = 8
```

Decrements the stencil value, wrapping on underflow.

### IncrementClamp

```
public static final int IncrementClamp = 5
```

Increments the stencil value, clamping at the maximum.

### IncrementWrap

```
public static final int IncrementWrap = 7
```

Increments the stencil value, wrapping on overflow.

### Invert

```
public static final int Invert = 4
```

Inverts the bits of the stencil value.

### Keep

```
public static final int Keep = 1
```

Keeps the current stencil value.

### Replace

```
public static final int Replace = 3
```

Replaces the stencil value with the reference value.

### Undefined

```
public static final int Undefined = 0
```

Indicates that no stencil operation is specified.

### Zero

```
public static final int Zero = 2
```

Sets the stencil value to zero.

## Public methods

### toString

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

```
public static final @NonNull String toString(int value)
```