# CompositeAlphaMode

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

*** ** * ** ***


```
public final class CompositeAlphaMode
```

<br />

*** ** * ** ***

Defines how the alpha channel of a surface's texture is handled during compositing.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/CompositeAlphaMode#Auto() = 0` The implementation selects the optimal composite alpha mode. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/CompositeAlphaMode#Inherit() = 4` The alpha compositing is handled by the system outside of WebGPU. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/CompositeAlphaMode#Opaque() = 1` The alpha channel is ignored and treated as `1.0`. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/CompositeAlphaMode#Premultiplied() = 2` Color channels are assumed to be premultiplied by the alpha channel. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/CompositeAlphaMode#Unpremultiplied() = 3` Color channels are not premultiplied by the alpha channel. |

| ### 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/CompositeAlphaMode#toString(kotlin.Int)(int value)` |

## Constants

### Auto

```
public static final int Auto = 0
```

The implementation selects the optimal composite alpha mode.

### Inherit

```
public static final int Inherit = 4
```

The alpha compositing is handled by the system outside of WebGPU.

### Opaque

```
public static final int Opaque = 1
```

The alpha channel is ignored and treated as `1.0`.

### Premultiplied

```
public static final int Premultiplied = 2
```

Color channels are assumed to be premultiplied by the alpha channel.

### Unpremultiplied

```
public static final int Unpremultiplied = 3
```

Color channels are not premultiplied by the alpha channel.

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