BrushTip.Builder



Builder for BrushTip.

For Java developers, use BrushTip.Builder to construct a BrushTip with default values, overriding only as needed. For example: BrushTip tip = BrushTip.builder().setCornerRounding(0.5).build();

Summary

Public constructors

Cmn

Public functions

BrushTip.Builder

Adds a behavior to this brush tip.

Cmn
BrushTip

Constructs a BrushTip from this Builder.

Cmn
BrushTip.Builder

Sets the list of behaviors for this brush tip (replacing any previously-added behaviors).

Cmn
BrushTip.Builder
setCornerRounding(cornerRounding: @FloatRange(from = 0.0, to = 1.0) Float)

Sets the corner rounding for this brush tip.

Cmn
BrushTip.Builder
setParticleGapDistanceScale(
    particleGapDistanceScale: @FloatRange(from = 0.0, toInclusive = false) Float
)

Sets the distance-based particle gap for this brush tip.

Cmn
BrushTip.Builder
setParticleGapDurationMillis(
    particleGapDurationMillis: @IntRange(from = 0) Long
)

Sets the time-based particle gap for this brush tip.

Cmn
BrushTip.Builder
setPinch(pinch: @FloatRange(from = 0.0, to = 1.0) Float)

Sets the pinch for this brush tip.

Cmn
BrushTip.Builder

Sets the rotation angle for this brush tip.

Cmn
BrushTip.Builder
setScaleX(scaleX: @FloatRange(from = 0.0, toInclusive = false) Float)

Sets the horizontal scale for this brush tip.

Cmn
BrushTip.Builder
setScaleY(scaleY: @FloatRange(from = 0.0, toInclusive = false) Float)

Sets the vertical scale for this brush tip.

Cmn
BrushTip.Builder
setSlantDegrees(
    degrees: @FloatRange(from = -90.0, to = 90.0) @AngleDegreesFloat Float
)

Sets the slant angle for this brush tip.

Cmn

Public constructors

Builder

Builder()

Public functions

addBehavior

fun addBehavior(behavior: BrushBehavior): BrushTip.Builder

Adds a behavior to this brush tip.

build

fun build(): BrushTip

Constructs a BrushTip from this Builder.

setBehaviors

fun setBehaviors(behaviors: List<BrushBehavior>): BrushTip.Builder

Sets the list of behaviors for this brush tip (replacing any previously-added behaviors).

setCornerRounding

fun setCornerRounding(cornerRounding: @FloatRange(from = 0.0, to = 1.0) Float): BrushTip.Builder

Sets the corner rounding for this brush tip.

setParticleGapDistanceScale

fun setParticleGapDistanceScale(
    particleGapDistanceScale: @FloatRange(from = 0.0, toInclusive = false) Float
): BrushTip.Builder

Sets the distance-based particle gap for this brush tip.

setParticleGapDurationMillis

fun setParticleGapDurationMillis(
    particleGapDurationMillis: @IntRange(from = 0) Long
): BrushTip.Builder

Sets the time-based particle gap for this brush tip.

setPinch

fun setPinch(pinch: @FloatRange(from = 0.0, to = 1.0) Float): BrushTip.Builder

Sets the pinch for this brush tip.

setRotationDegrees

fun setRotationDegrees(degrees: @AngleDegreesFloat Float): BrushTip.Builder

Sets the rotation angle for this brush tip.

setScaleX

fun setScaleX(scaleX: @FloatRange(from = 0.0, toInclusive = false) Float): BrushTip.Builder

Sets the horizontal scale for this brush tip.

setScaleY

fun setScaleY(scaleY: @FloatRange(from = 0.0, toInclusive = false) Float): BrushTip.Builder

Sets the vertical scale for this brush tip.

setSlantDegrees

fun setSlantDegrees(
    degrees: @FloatRange(from = -90.0, to = 90.0) @AngleDegreesFloat Float
): BrushTip.Builder

Sets the slant angle for this brush tip.