# OutOfRange

Artifact: [androidx.ink:ink-brush](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/behavior/OutOfRange.kt+class:androidx.ink.brush.behavior.OutOfRange) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***

Common/All
- Cmn

  ```
  class OutOfRange
  ```

*** ** * ** ***

The desired behavior when an input value is outside the range defined by `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeStart()` and `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeEnd()`.

## Summary

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange#CLAMP()` Values outside the range will be clamped to not exceed the bounds. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange#MIRROR()` Similar to `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange#REPEAT()`, but every other repetition of the bounds will be mirrored, as though `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeStart()` and `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeEnd()` were swapped. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange#REPEAT()` Values will be shifted by an integer multiple of the range size so that they fall within the bounds. | Cmn |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange#calculateMinimumRequiredVersion()()` Returns the minimum required `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` for this `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange#toString()()` | Cmn |

## Public companion properties

### CLAMP

Cmn

```
val CLAMP: OutOfRange
```

Values outside the range will be clamped to not exceed the bounds.

### MIRROR

Cmn

```
val MIRROR: OutOfRange
```

Similar to `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange#REPEAT()`, but every other repetition of the bounds will be mirrored, as though `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeStart()` and `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeEnd()` were swapped. This means the range does not need to be treated as a half-open interval like in the case of `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange#REPEAT()`.

### REPEAT

Cmn

```
val REPEAT: OutOfRange
```

Values will be shifted by an integer multiple of the range size so that they fall within the bounds.

In this case, the range will be treated as a half-open interval, with a value exactly at `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeEnd()` being treated as though it was `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeStart()`.

## Public functions

### calculateMinimumRequiredVersion

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun calculateMinimumRequiredVersion(): Version
```

Returns the minimum required `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` for this `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange`.

By default, decoding a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily` containing an `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange` with a minimum required version higher than `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version#MAX_SUPPORTED()` will fail.

### toString

Cmn

```
open fun toString(): String
```