BrushPaint


public final class BrushPaint


Parameters that control stroke mesh rendering.

The core of each paint consists of one or more texture layers. The output of each layer is blended together in sequence, then the combined texture is blended with the output from the brush color.

  • Starting with the first TextureLayer, the combined texture for layers 0 to i (source) is blended with layer i+1 (destination) using the blend mode for layer i.

  • The final combined texture (source) is blended with the (possibly adjusted per-vertex) brush color (destination) according to the blend mode of the last texture layer.

Summary

Nested types

public abstract class BrushPaint.ColorFunction

A ColorFunction defines a mapping over colors.

A ColorFunction that scales the color opacity by a specified multiplier.

A ColorFunction that ignores the input color and replaces it with the specified color.

A texture that is "stamped" onto each particle of the stroke, scaled or rotated appropriately to cover the whole particle.

Builder for StampingTexture.

public abstract class BrushPaint.TextureLayer

The method by which the combined texture layers (index <= i) are blended with the next layer.

Units for specifying TextureLayer dimensions.

public final class BrushPaint.TextureLayer.Wrap

Wrap modes for specifying TextureLayer wrapping behavior.

A texture layer that will repeat according to a 2D affine transformation of vertex positions.

Builder for TilingTexture.

Specification of the origin point to use for the texture.

Public constructors

BrushPaint(
    @NonNull List<@NonNull BrushPaint.TextureLayer> textureLayers,
    @NonNull List<@NonNull BrushPaint.ColorFunction> colorFunctions,
    @NonNull SelfOverlap selfOverlap
)

Creates a BrushPaint with the given textureLayers.

Public methods

boolean
equals(Object other)
final @NonNull List<@NonNull BrushPaint.ColorFunction>

An immutable list of the transformations to apply to the base brush color (in order) before drawing this coat of paint.

final @NonNull SelfOverlap
final @NonNull List<@NonNull BrushPaint.TextureLayer>

An immutable list of the textures to apply to the stroke.

int
@NonNull String

Public constructors

BrushPaint

public BrushPaint(
    @NonNull List<@NonNull BrushPaint.TextureLayer> textureLayers,
    @NonNull List<@NonNull BrushPaint.ColorFunction> colorFunctions,
    @NonNull SelfOverlap selfOverlap
)

Creates a BrushPaint with the given textureLayers.

Parameters
@NonNull List<@NonNull BrushPaint.TextureLayer> textureLayers

The textures to apply to the stroke.

@NonNull List<@NonNull BrushPaint.ColorFunction> colorFunctions

The color functions to apply to the brush color.

@NonNull SelfOverlap selfOverlap

The self-overlap behavior to apply to this coat of the stroke.

Public methods

equals

public boolean equals(Object other)

getColorFunctions

Added in 1.1.0-alpha03
public final @NonNull List<@NonNull BrushPaint.ColorFunctiongetColorFunctions()

An immutable list of the transformations to apply to the base brush color (in order) before drawing this coat of paint. When this list is empty, the base brush color will be used unchanged.

getSelfOverlap

Added in 1.1.0-alpha03
public final @NonNull SelfOverlap getSelfOverlap()

getTextureLayers

Added in 1.1.0-alpha03
public final @NonNull List<@NonNull BrushPaint.TextureLayergetTextureLayers()

An immutable list of the textures to apply to the stroke.

hashCode

public int hashCode()

toString

public @NonNull String toString()