# GPUTextureComponentSwizzle

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

*** ** * ** ***


```
public final class GPUTextureComponentSwizzle
```

<br />

*** ** * ** ***

Defines the mapping of source texture components to the color channels of a texture view, allowing for reordering or forcing values.

## Summary

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

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#GPUTextureComponentSwizzle(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)(int r, int g, int b, int a)` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#getA()()` Specifies the source component or constant value to use for the alpha channel of the view. |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#getB()()` Specifies the source component or constant value to use for the blue channel of the view. |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#getG()()` Specifies the source component or constant value to use for the green channel of the view. |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#getR()()` Specifies the source component or constant value to use for the red channel of the view. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#setA(kotlin.Int)(int value)` Specifies the source component or constant value to use for the alpha channel of the view. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#setB(kotlin.Int)(int value)` Specifies the source component or constant value to use for the blue channel of the view. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#setG(kotlin.Int)(int value)` Specifies the source component or constant value to use for the green channel of the view. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle#setR(kotlin.Int)(int value)` Specifies the source component or constant value to use for the red channel of the view. |

## Public constructors

### GPUTextureComponentSwizzle

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

```
public GPUTextureComponentSwizzle(int r, int g, int b, int a)
```

## Public methods

### getA

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

```
public final int getA()
```

Specifies the source component or constant value to use for the alpha channel of the view.

### getB

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

```
public final int getB()
```

Specifies the source component or constant value to use for the blue channel of the view.

### getG

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

```
public final int getG()
```

Specifies the source component or constant value to use for the green channel of the view.

### getR

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

```
public final int getR()
```

Specifies the source component or constant value to use for the red channel of the view.

### setA

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

```
public final void setA(int value)
```

Specifies the source component or constant value to use for the alpha channel of the view.

### setB

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

```
public final void setB(int value)
```

Specifies the source component or constant value to use for the blue channel of the view.

### setG

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

```
public final void setG(int value)
```

Specifies the source component or constant value to use for the green channel of the view.

### setR

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

```
public final void setR(int value)
```

Specifies the source component or constant value to use for the red channel of the view.