TargetNode.Target
-
Cmn
class TargetNode.Target
List of scalar tip properties that can be modified by a androidx.ink.brush.BrushBehavior.
Summary
Public companion properties |
||
|---|---|---|
TargetNode.Target |
Adds the target modifier to |
Cmn
|
TargetNode.Target |
Scales the brush-tip height, starting from the value calculated using |
Cmn
|
TargetNode.Target |
Shifts the hue of the base brush color. |
Cmn
|
TargetNode.Target |
Shifts the luminosity 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 |
Cmn
|
TargetNode.Target |
Adds the target modifier to |
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 |
Cmn
|
TargetNode.Target |
Scales the saturation of the base brush color. |
Cmn
|
TargetNode.Target |
Convenience enumerator to target both |
Cmn
|
TargetNode.Target |
Adds the target modifier to |
Cmn
|
TargetNode.Target |
Scales the brush-tip width, starting from the value calculated using |
Cmn
|
Public companion properties
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. 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.
LUMINOSITY_OFFSET
val LUMINOSITY_OFFSET: TargetNode.Target
Shifts the luminosity of the base brush color. An offset of ±1.0 corresponds to changing the luminosity by up to ±100%. If multiple behaviors have this target, they stack additively. The final luminosity 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.
SATURATION_MULTIPLIER
val SATURATION_MULTIPLIER: TargetNode.Target
Scales the saturation of the base brush color. If multiple behaviors have one of these targets, they stack multiplicatively. The final saturation multiplier is clamped to 0, 2.
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.