# BlendFactor

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

*** ** * ** ***


```
class BlendFactor
```

<br />

*** ** * ** ***

Defines the factors used in blend operations.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#Constant() = 12` The blend factor is the blend constant `(Rc, Gc, Bc, Ac)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#Dst() = 7` The blend factor is `(Rd, Gd, Bd, Ad)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#DstAlpha() = 9` The blend factor is `(Ad, Ad, Ad, Ad)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#One() = 2` The blend factor is `(1, 1, 1, 1)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#OneMinusConstant() = 13` The blend factor is `(1-Rc, 1-Gc, 1-Bc, 1-Ac)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#OneMinusDst() = 8` The blend factor is `(1-Rd, 1-Gd, 1-Bd, 1-Ad)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#OneMinusDstAlpha() = 10` The blend factor is `(1-Ad, 1-Ad, 1-Ad, 1-Ad)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#OneMinusSrc() = 4` The blend factor is `(1-Rs, 1-Gs, 1-Bs, 1-As)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#OneMinusSrc1() = 15` The blend factor is `(1-Rs1, 1-Gs1, 1-Bs1, 1-As1)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#OneMinusSrc1Alpha() = 17` The blend factor is `(1-As1, 1-As1, 1-As1, 1-As1)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#OneMinusSrcAlpha() = 6` The blend factor is `(1-As, 1-As, 1-As, 1-As)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#Src() = 3` The blend factor is `(Rs, Gs, Bs, As)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#Src1() = 14` The blend factor is the second source color `(Rs1, Gs1, Bs1, As1)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#Src1Alpha() = 16` The blend factor is `(As1, As1, As1, As1)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#SrcAlpha() = 5` The blend factor is `(As, As, As, As)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#SrcAlphaSaturated() = 11` The blend factor is `(f, f, f, 1)` where `f = min(As, 1 - Ad)`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#Undefined() = 0` Indicates that no blend factor is specified. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BlendFactor#Zero() = 1` The blend factor is `(0, 0, 0, 0)`. |

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

## Constants

### Constant

```
const val Constant = 12: Int
```

The blend factor is the blend constant `(Rc, Gc, Bc, Ac)`.

### Dst

```
const val Dst = 7: Int
```

The blend factor is `(Rd, Gd, Bd, Ad)`.

### DstAlpha

```
const val DstAlpha = 9: Int
```

The blend factor is `(Ad, Ad, Ad, Ad)`.

### One

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

The blend factor is `(1, 1, 1, 1)`.

### OneMinusConstant

```
const val OneMinusConstant = 13: Int
```

The blend factor is `(1-Rc, 1-Gc, 1-Bc, 1-Ac)`.

### OneMinusDst

```
const val OneMinusDst = 8: Int
```

The blend factor is `(1-Rd, 1-Gd, 1-Bd, 1-Ad)`.

### OneMinusDstAlpha

```
const val OneMinusDstAlpha = 10: Int
```

The blend factor is `(1-Ad, 1-Ad, 1-Ad, 1-Ad)`.

### OneMinusSrc

```
const val OneMinusSrc = 4: Int
```

The blend factor is `(1-Rs, 1-Gs, 1-Bs, 1-As)`.

### OneMinusSrc1

```
const val OneMinusSrc1 = 15: Int
```

The blend factor is `(1-Rs1, 1-Gs1, 1-Bs1, 1-As1)`. Requires @see `https://developer.android.com/reference/kotlin/androidx/webgpu/FeatureName#DualSourceBlending()`.

### OneMinusSrc1Alpha

```
const val OneMinusSrc1Alpha = 17: Int
```

The blend factor is `(1-As1, 1-As1, 1-As1, 1-As1)`. Requires @see `https://developer.android.com/reference/kotlin/androidx/webgpu/FeatureName#DualSourceBlending()`.

### OneMinusSrcAlpha

```
const val OneMinusSrcAlpha = 6: Int
```

The blend factor is `(1-As, 1-As, 1-As, 1-As)`.

### Src

```
const val Src = 3: Int
```

The blend factor is `(Rs, Gs, Bs, As)`.

### Src1

```
const val Src1 = 14: Int
```

The blend factor is the second source color `(Rs1, Gs1, Bs1, As1)`. Requires

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/FeatureName#DualSourceBlending()` | . |

### Src1Alpha

```
const val Src1Alpha = 16: Int
```

The blend factor is `(As1, As1, As1, As1)`. Requires @see `https://developer.android.com/reference/kotlin/androidx/webgpu/FeatureName#DualSourceBlending()`.

### SrcAlpha

```
const val SrcAlpha = 5: Int
```

The blend factor is `(As, As, As, As)`.

### SrcAlphaSaturated

```
const val SrcAlphaSaturated = 11: Int
```

The blend factor is `(f, f, f, 1)` where `f = min(As, 1 - Ad)`.

### Undefined

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

Indicates that no blend factor is specified.

### Zero

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

The blend factor is `(0, 0, 0, 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
```