BrushPaint.TilingTexture.Builder



Builder for TilingTexture.

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

Summary

Public functions

BrushPaint.TilingTexture

Constructs a TilingTexture from this Builder.

Cmn
BrushPaint.TilingTexture.Builder

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

Cmn
BrushPaint.TilingTexture.Builder
setClientTextureId(clientTextureId: String)

Sets the client texture ID for this texture layer.

Cmn
BrushPaint.TilingTexture.Builder
setOffsetX(offsetX: Float)

Sets the horizontal offset of this texture layer, expressed as a fraction of the texture width.

Cmn
BrushPaint.TilingTexture.Builder
setOffsetY(offsetY: Float)

Sets the vertical offset of this texture layer, expressed as a fraction of the texture height.

Cmn
BrushPaint.TilingTexture.Builder

Sets the origin that should be used for positioning this texture layer.

Cmn
BrushPaint.TilingTexture.Builder

Sets the rotation angle of this texture layer.

Cmn
BrushPaint.TilingTexture.Builder

Sets the units in which this texture layer's width and height are measured.

Cmn
BrushPaint.TilingTexture.Builder
setSizeX(
    sizeX: @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) Float
)

Sets the width of this texture layer, measured in the units specified by sizeUnit.

Cmn
BrushPaint.TilingTexture.Builder
setSizeY(
    sizeY: @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) Float
)

Sets the height of this texture layer, measured in the units specified by sizeUnit.

Cmn
BrushPaint.TilingTexture.Builder

Sets the horizontal wrapping mode for this texture layer.

Cmn
BrushPaint.TilingTexture.Builder

Sets the vertical wrapping mode for this texture layer.

Cmn

Public functions

build

fun build(): BrushPaint.TilingTexture

Constructs a TilingTexture from this Builder.

Throws
IllegalStateException

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

setBlendMode

fun setBlendMode(blendMode: BrushPaint.TextureLayer.BlendMode): BrushPaint.TilingTexture.Builder

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

setClientTextureId

fun setClientTextureId(clientTextureId: String): BrushPaint.TilingTexture.Builder

Sets the client texture ID for this texture layer.

setOffsetX

fun setOffsetX(offsetX: Float): BrushPaint.TilingTexture.Builder

Sets the horizontal offset of this texture layer, expressed as a fraction of the texture width.

setOffsetY

fun setOffsetY(offsetY: Float): BrushPaint.TilingTexture.Builder

Sets the vertical offset of this texture layer, expressed as a fraction of the texture height.

setOrigin

fun setOrigin(origin: BrushPaint.TilingTexture.Origin): BrushPaint.TilingTexture.Builder

Sets the origin that should be used for positioning this texture layer.

setRotationDegrees

fun setRotationDegrees(degrees: @AngleDegreesFloat Float): BrushPaint.TilingTexture.Builder

Sets the rotation angle of this texture layer.

setSizeUnit

fun setSizeUnit(sizeUnit: BrushPaint.TextureLayer.SizeUnit): BrushPaint.TilingTexture.Builder

Sets the units in which this texture layer's width and height are measured.

setSizeX

fun setSizeX(
    sizeX: @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) Float
): BrushPaint.TilingTexture.Builder

Sets the width of this texture layer, measured in the units specified by sizeUnit.

setSizeY

fun setSizeY(
    sizeY: @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) Float
): BrushPaint.TilingTexture.Builder

Sets the height of this texture layer, measured in the units specified by sizeUnit.

setWrapX

fun setWrapX(wrapX: BrushPaint.TextureLayer.Wrap): BrushPaint.TilingTexture.Builder

Sets the horizontal wrapping mode for this texture layer.

setWrapY

fun setWrapY(wrapY: BrushPaint.TextureLayer.Wrap): BrushPaint.TilingTexture.Builder

Sets the vertical wrapping mode for this texture layer.