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

*** ** * ** ***


```
public final class ComponentSwizzle
```

<br />

*** ** * ** ***

Defines how component values are remapped when sampling a texture.

## Summary

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

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

## Constants

### A

```
public static final int A = 6
```

Take its value from the alpha channel of the texture.

### B

```
public static final int B = 5
```

Take its value from the blue channel of the texture.

### G

```
public static final int G = 4
```

Take its value from the green channel of the texture.

### One

```
public static final int One = 2
```

Force its value to 1.

### R

```
public static final int R = 3
```

Take its value from the red channel of the texture.

### Undefined

```
public static final int Undefined = 0
```

Indicates no value is passed for this argument.

### Zero

```
public static final int Zero = 1
```

Force its value to 0.

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