# ComponentSwizzle

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

*** ** * ** ***


```
class ComponentSwizzle
```

<br />

*** ** * ** ***

Defines how component values are remapped when sampling a texture.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/ComponentSwizzle#A() = 6` Take its value from the alpha channel of the texture. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/ComponentSwizzle#B() = 5` Take its value from the blue channel of the texture. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/ComponentSwizzle#G() = 4` Take its value from the green channel of the texture. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/ComponentSwizzle#One() = 2` Force its value to 1. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/ComponentSwizzle#R() = 3` Take its value from the red channel of the texture. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/ComponentSwizzle#Undefined() = 0` Indicates no value is passed for this argument. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/ComponentSwizzle#Zero() = 1` Force its value to 0. |

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/ComponentSwizzle#toString(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### A

```
const val A = 6: Int
```

Take its value from the alpha channel of the texture.

### B

```
const val B = 5: Int
```

Take its value from the blue channel of the texture.

### G

```
const val G = 4: Int
```

Take its value from the green channel of the texture.

### One

```
const val One = 2: Int
```

Force its value to 1.

### R

```
const val R = 3: Int
```

Take its value from the red channel of the texture.

### Undefined

```
const val Undefined = 0: Int
```

Indicates no value is passed for this argument.

### Zero

```
const val Zero = 1: Int
```

Force its value to 0.

## Public companion functions

### toString

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

```
fun toString(value: Int): String
```