# SourceNode

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/SourceNode.kt+class:androidx.ink.brush.behavior.SourceNode) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***

Common/All
- Cmn

  ```
  class SourceNode : ValueNode
  ```

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.ink.brush.behavior.Node](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node) |||
|   | ↳ | [androidx.ink.brush.behavior.ValueNode](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ValueNode) ||
|   |   | ↳ | [androidx.ink.brush.behavior.SourceNode](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode) |

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ValueNode` that gets data from the stroke input batch.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode.Source` List of input properties along with their units that can act as sources for a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushBehavior`. |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#SourceNode(androidx.ink.brush.behavior.SourceNode.Source,kotlin.Float,kotlin.Float,androidx.ink.brush.behavior.OutOfRange)( source: https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode.Source, sourceValueRangeStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, sourceValueRangeEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, sourceOutOfRangeBehavior: https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange )` Creates a `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode` that gets data from the stroke inputs. | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode.Source` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#source()` The property of the data to get values from. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceOutOfRangeBehavior()` The behavior to use if the source produces a value outside the specified range. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeEnd()` The end of the range of values that the source can produce. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#sourceValueRangeStart()` The start of the range of values that the source can produce. | Cmn |

### Inherited functions

From [androidx.ink.brush.behavior.Node](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node) `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node#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/Node`.
Cmn

### Inherited properties

From [androidx.ink.brush.behavior.Node](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ValueNode>` `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node#inputs()`

The ordered list of inputs that this node directly depends on.
Cmn

## Public constructors

### SourceNode

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

```
SourceNode(
    source: SourceNode.Source,
    sourceValueRangeStart: Float,
    sourceValueRangeEnd: Float,
    sourceOutOfRangeBehavior: OutOfRange = OutOfRange.CLAMP
)
```

Creates a `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode` that gets data from the stroke inputs.

| Parameters |
|---|---|
| `source: https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode.Source` | the property of the data to get values from |
| `sourceValueRangeStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the start of the range of values that the source can produce. Must be finite and distinct from `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#(androidx.ink.brush.behavior.SourceNode.Source,kotlin.Float,kotlin.Float,androidx.ink.brush.behavior.OutOfRange)` |
| `sourceValueRangeEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the end of the range of values that the source can produce. Must be finite and distinct from `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/SourceNode#(androidx.ink.brush.behavior.SourceNode.Source,kotlin.Float,kotlin.Float,androidx.ink.brush.behavior.OutOfRange)` |
| `sourceOutOfRangeBehavior: https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/OutOfRange = OutOfRange.CLAMP` | the behavior to use if the source produces a value outside the specified range |

## Public functions

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### toString

Cmn

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

## Public properties

### source

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

```
val source: SourceNode.Source
```

The property of the data to get values from.

### sourceOutOfRangeBehavior

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

```
val sourceOutOfRangeBehavior: OutOfRange
```

The behavior to use if the source produces a value outside the specified range.

### sourceValueRangeEnd

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

```
val sourceValueRangeEnd: Float
```

The end of the range of values that the source can produce.

### sourceValueRangeStart

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

```
val sourceValueRangeStart: Float
```

The start of the range of values that the source can produce.