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

*** ** * ** ***


```
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 |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzle.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzle`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzle#GPUTextureComponentSwizzle(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)(r: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, g: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, b: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, a: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzle#a()` Specifies the source component or constant value to use for the alpha channel of the view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzle#b()` Specifies the source component or constant value to use for the blue channel of the view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzle#g()` Specifies the source component or constant value to use for the green channel of the view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzle#r()` 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)

```
GPUTextureComponentSwizzle(
    r: Int = ComponentSwizzle.R,
    g: Int = ComponentSwizzle.G,
    b: Int = ComponentSwizzle.B,
    a: Int = ComponentSwizzle.A
)
```

## Public properties

### a

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

```
var a: Int
```

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

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`

<br />

### b

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

```
var b: Int
```

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

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`

<br />

### g

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

```
var g: Int
```

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

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`

<br />

### r

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

```
var r: Int
```

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

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`

<br />