# GPUBlendState

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

*** ** * ** ***


```
public final class GPUBlendState
```

<br />

*** ** * ** ***

Defines the blending configuration for a color attachment.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/webgpu/GPUBlendState.Builder` Builder for `https://developer.android.com/reference/androidx/webgpu/GPUBlendState`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUBlendState#GPUBlendState(androidx.webgpu.GPUBlendComponent,androidx.webgpu.GPUBlendComponent)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBlendComponent color, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBlendComponent alpha )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBlendComponent` | `https://developer.android.com/reference/androidx/webgpu/GPUBlendState#getAlpha()()` The blend component for the alpha channel. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBlendComponent` | `https://developer.android.com/reference/androidx/webgpu/GPUBlendState#getColor()()` The blend component for the RGB channels. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUBlendState#setAlpha(androidx.webgpu.GPUBlendComponent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBlendComponent value)` The blend component for the alpha channel. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUBlendState#setColor(androidx.webgpu.GPUBlendComponent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBlendComponent value)` The blend component for the RGB channels. |

## Public constructors

### GPUBlendState

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

```
public GPUBlendState(
    @NonNull GPUBlendComponent color,
    @NonNull GPUBlendComponent alpha
)
```

## Public methods

### getAlpha

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

```
public final @NonNull GPUBlendComponent getAlpha()
```

The blend component for the alpha channel.

### getColor

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

```
public final @NonNull GPUBlendComponent getColor()
```

The blend component for the RGB channels.

### setAlpha

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

```
public final void setAlpha(@NonNull GPUBlendComponent value)
```

The blend component for the alpha channel.

### setColor

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

```
public final void setColor(@NonNull GPUBlendComponent value)
```

The blend component for the RGB channels.