TargetNode.Target



List of scalar tip properties that can be modified by a androidx.ink.brush.BrushBehavior.

Summary

Public companion properties

TargetNode.Target

Scales the chroma of the base brush color.

Cmn
TargetNode.Target

Adds the target modifier to androidx.ink.brush.BrushTip.cornerRounding.

Cmn
TargetNode.Target

Scales the brush-tip height, starting from the value calculated using androidx.ink.brush.BrushTip.scaleY.

Cmn
TargetNode.Target

Shifts the hue of the base brush color, while maintaining the same level of perceived lightness.

Cmn
TargetNode.Target

Shifts the perceived lightness of the base brush color.

Cmn
TargetNode.Target

Scales the opacity of the base brush color.

Cmn
TargetNode.Target

Adds the target modifier to the initial brush paint animation progress value of the current particle (which is relevant only for strokes with an animated BrushPaint).

Cmn
TargetNode.Target

Adds the target modifier to androidx.ink.brush.BrushTip.pinch.

Cmn
TargetNode.Target

Moves the brush tip by the target modifier times the brush size in the direction of the modeled stroke input's velocity (the opposite direction if the value is negative).

Cmn
TargetNode.Target

Moves the brush tip by the target modifier times the brush size perpendicular to the modeled stroke input's velocity, rotated 90 degrees in the direction from the positive x-axis to the positive y-axis.

Cmn
TargetNode.Target

Adds the target modifier times the brush size to the brush tip x position.

Cmn
TargetNode.Target

Adds the target modifier times the brush size to the brush tip y position .

Cmn
TargetNode.Target

Adds the target modifier to androidx.ink.brush.BrushTip.rotationDegrees.

Cmn
TargetNode.Target

Convenience enumerator to target both WIDTH_MULTIPLIER and HEIGHT_MULTIPLIER.

Cmn
TargetNode.Target

Adds the target modifier to androidx.ink.brush.BrushTip.slantDegrees.

Cmn
TargetNode.Target

Scales the brush-tip width, starting from the value calculated using androidx.ink.brush.BrushTip.scaleX.

Cmn

Public functions

Version

Returns the minimum required Version for this Target.

Cmn
open String
Cmn

Public companion properties

CHROMA_MULTIPLIER

val CHROMA_MULTIPLIER: TargetNode.Target

Scales the chroma of the base brush color. A value greater than 1.0 makes the color more saturated, a value less than 1.0 makes the color less saturated, and a value of 0.0 makes the color grayscale. If multiple behaviors have one of these targets, they stack multiplicatively. The final chroma multiplier is clamped to 0, 2.

CORNER_ROUNDING_OFFSET

val CORNER_ROUNDING_OFFSET: TargetNode.Target

Adds the target modifier to androidx.ink.brush.BrushTip.cornerRounding. The final brush corner rounding value is clamped to 0, 1. If multiple behaviors have this target, they stack additively.

HEIGHT_MULTIPLIER

val HEIGHT_MULTIPLIER: TargetNode.Target

Scales the brush-tip height, starting from the value calculated using androidx.ink.brush.BrushTip.scaleY. If multiple behaviors have this target, they stack multiplicatively.

HUE_OFFSET_IN_RADIANS

val HUE_OFFSET_IN_RADIANS: TargetNode.Target

Shifts the hue of the base brush color, while maintaining the same level of perceived lightness. A positive offset shifts around the hue wheel from red towards orange, while a negative offset shifts the other way, from red towards violet. The final hue offset is not clamped, but is effectively normalized (mod 2π). If multiple behaviors have this target, they stack additively.

LIGHTNESS_OFFSET

val LIGHTNESS_OFFSET: TargetNode.Target

Shifts the perceived lightness of the base brush color. An offset of ±1.0 corresponds to changing the lightness by up to ±100%. If multiple behaviors have this target, they stack additively. The final lightness offset is clamped to -1, 1.

OPACITY_MULTIPLIER

val OPACITY_MULTIPLIER: TargetNode.Target

Scales the opacity of the base brush color. If multiple behaviors have one of these targets, they stack multiplicatively. The final opacity multiplier is clamped to 0, 2.

PAINT_ANIMATION_PROGRESS_OFFSET

val PAINT_ANIMATION_PROGRESS_OFFSET: TargetNode.Target

Adds the target modifier to the initial brush paint animation progress value of the current particle (which is relevant only for strokes with an animated BrushPaint). The final progress offset is not clamped, but is effectively normalized (mod 2, to account for potential use of AnimationRepeatMode.REVERSE). If multiple behaviors have this target, they stack additively.

PINCH_OFFSET

val PINCH_OFFSET: TargetNode.Target

Adds the target modifier to androidx.ink.brush.BrushTip.pinch. The final brush pinch value is clamped to 0, 1. If multiple behaviors have this target, they stack additively.

POSITION_OFFSET_FORWARD_IN_MULTIPLES_OF_BRUSH_SIZE

val POSITION_OFFSET_FORWARD_IN_MULTIPLES_OF_BRUSH_SIZE: TargetNode.Target

Moves the brush tip by the target modifier times the brush size in the direction of the modeled stroke input's velocity (the opposite direction if the value is negative). For example, if a stroke is moving from left to right, a positive modifier will shift the brush tip to the right, and a negative modifier will shift the brush tip to the left.

POSITION_OFFSET_LATERAL_IN_MULTIPLES_OF_BRUSH_SIZE

val POSITION_OFFSET_LATERAL_IN_MULTIPLES_OF_BRUSH_SIZE: TargetNode.Target

Moves the brush tip by the target modifier times the brush size perpendicular to the modeled stroke input's velocity, rotated 90 degrees in the direction from the positive x-axis to the positive y-axis. For example, if positive-Y is up, and a stroke is moving from left to right, a positive modifier will shift the brush tip up, and a negative modifier will shift the brush tip down.

POSITION_OFFSET_X_IN_MULTIPLES_OF_BRUSH_SIZE

val POSITION_OFFSET_X_IN_MULTIPLES_OF_BRUSH_SIZE: TargetNode.Target

Adds the target modifier times the brush size to the brush tip x position.

POSITION_OFFSET_Y_IN_MULTIPLES_OF_BRUSH_SIZE

val POSITION_OFFSET_Y_IN_MULTIPLES_OF_BRUSH_SIZE: TargetNode.Target

Adds the target modifier times the brush size to the brush tip y position .

ROTATION_OFFSET_IN_RADIANS

val ROTATION_OFFSET_IN_RADIANS: TargetNode.Target

Adds the target modifier to androidx.ink.brush.BrushTip.rotationDegrees. The final brush rotation angle is effectively normalized (mod 2π). If multiple behaviors have this target, they stack additively.

SIZE_MULTIPLIER

val SIZE_MULTIPLIER: TargetNode.Target

Convenience enumerator to target both WIDTH_MULTIPLIER and HEIGHT_MULTIPLIER.

SLANT_OFFSET_IN_RADIANS

val SLANT_OFFSET_IN_RADIANS: TargetNode.Target

Adds the target modifier to androidx.ink.brush.BrushTip.slantDegrees. The final brush slant value is clamped to -π/2, π/2. If multiple behaviors have this target, they stack additively.

WIDTH_MULTIPLIER

val WIDTH_MULTIPLIER: TargetNode.Target

Scales the brush-tip width, starting from the value calculated using androidx.ink.brush.BrushTip.scaleX. If multiple behaviors have this target, they stack multiplicatively.

Public functions

calculateMinimumRequiredVersion

fun calculateMinimumRequiredVersion(): Version

Returns the minimum required Version for this Target.

By default, decoding a androidx.ink.brush.BrushFamily containing a Target with a minimum required version higher than Version.MAX_SUPPORTED will fail.

toString

open fun toString(): String