SourceNode


public final class SourceNode extends ValueNode


A ValueNode that gets data from the stroke input batch.

Summary

Nested types

public final class SourceNode.Source

List of input properties along with their units that can act as sources for a androidx.ink.brush.BrushBehavior.

Public constructors

SourceNode(
    @NonNull SourceNode.Source source,
    float sourceValueRangeStart,
    float sourceValueRangeEnd,
    @NonNull OutOfRange sourceOutOfRangeBehavior
)

Creates a SourceNode that gets data from the stroke inputs.

Public methods

boolean
equals(Object other)
final @NonNull SourceNode.Source

The property of the data to get values from.

final @NonNull OutOfRange

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

final float

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

final float

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

int
@NonNull String

Inherited methods

From androidx.ink.brush.behavior.Node
final @NonNull List<@NonNull ValueNode>

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

Public constructors

SourceNode

Added in 1.1.0-alpha03
public SourceNode(
    @NonNull SourceNode.Source source,
    float sourceValueRangeStart,
    float sourceValueRangeEnd,
    @NonNull OutOfRange sourceOutOfRangeBehavior
)

Creates a SourceNode that gets data from the stroke inputs.

Parameters
@NonNull SourceNode.Source source

the property of the data to get values from

float sourceValueRangeStart

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

float sourceValueRangeEnd

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

@NonNull OutOfRange sourceOutOfRangeBehavior

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

Public methods

equals

public boolean equals(Object other)

getSource

Added in 1.1.0-alpha03
public final @NonNull SourceNode.Source getSource()

The property of the data to get values from.

getSourceOutOfRangeBehavior

Added in 1.1.0-alpha03
public final @NonNull OutOfRange getSourceOutOfRangeBehavior()

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

getSourceValueRangeEnd

Added in 1.1.0-alpha03
public final float getSourceValueRangeEnd()

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

getSourceValueRangeStart

Added in 1.1.0-alpha03
public final float getSourceValueRangeStart()

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

hashCode

public int hashCode()

toString

public @NonNull String toString()