BrushPaint.StampingTexture.Builder


public final class BrushPaint.StampingTexture.Builder


Builder for StampingTexture.

For Java developers, use StampingTexture.Builder to construct a StampingTexture with default values, overriding only as needed. For example: StampingTexture layer = StampingTexture.builder().setClientTextureId(id).build();

Summary

Public methods

final @NonNull BrushPaint.StampingTexture

Constructs a TextureLayer from this Builder.

final @NonNull BrushPaint.StampingTexture.Builder
setAnimationColumns(@IntRange(from = 1, to = 4096) int animationColumns)

Sets the number of animation columns in this texture layer.

final @NonNull BrushPaint.StampingTexture.Builder
setAnimationDurationMillis(
    @IntRange(from = 0, to = 16777216) long animationDurationMillis
)

Sets the duration of the animation for this texture layer.

final @NonNull BrushPaint.StampingTexture.Builder
setAnimationFrames(@IntRange(from = 1, to = 16777216) int animationFrames)

Sets the number of animation frames in this texture layer.

final @NonNull BrushPaint.StampingTexture.Builder

Sets what should happen when this texture layer's animation repeats.

final @NonNull BrushPaint.StampingTexture.Builder
setAnimationRows(@IntRange(from = 1, to = 4096) int animationRows)

Sets the number of animation rows in this texture layer.

final @NonNull BrushPaint.StampingTexture.Builder

Sets the blend mode used for blending this and all previous texture layers with the next one.

final @NonNull BrushPaint.StampingTexture.Builder
setClientTextureId(@NonNull String clientTextureId)

Sets the client texture ID for this texture layer.

Public methods

build

Added in 1.1.0-alpha11
public final @NonNull BrushPaint.StampingTexture build()

Constructs a TextureLayer from this Builder.

Throws
IllegalStateException

if clientTextureId, sizeX, and/or sizeY were never set

setAnimationColumns

Added in 1.1.0-alpha11
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationColumns(@IntRange(from = 1, to = 4096) int animationColumns)

Sets the number of animation columns in this texture layer.

setAnimationDurationMillis

Added in 1.1.0-alpha11
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationDurationMillis(
    @IntRange(from = 0, to = 16777216) long animationDurationMillis
)

Sets the duration of the animation for this texture layer.

setAnimationFrames

Added in 1.1.0-alpha11
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationFrames(@IntRange(from = 1, to = 16777216) int animationFrames)

Sets the number of animation frames in this texture layer.

setAnimationRepeatMode

Added in 1.1.0-alpha11
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationRepeatMode(
    @NonNull BrushPaint.AnimationRepeatMode animationRepeatMode
)

Sets what should happen when this texture layer's animation repeats.

setAnimationRows

Added in 1.1.0-alpha11
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationRows(@IntRange(from = 1, to = 4096) int animationRows)

Sets the number of animation rows in this texture layer.

setBlendMode

Added in 1.1.0-alpha11
public final @NonNull BrushPaint.StampingTexture.Builder setBlendMode(@NonNull BrushPaint.TextureLayer.BlendMode blendMode)

Sets the blend mode used for blending this and all previous texture layers with the next one.

setClientTextureId

Added in 1.1.0-alpha11
public final @NonNull BrushPaint.StampingTexture.Builder setClientTextureId(@NonNull String clientTextureId)

Sets the client texture ID for this texture layer.