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

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.

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

Units for specifying TextureLayer dimensions.

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(
    textureLayers: List<BrushPaint.TextureLayer>,
    colorFunctions: List<BrushPaint.ColorFunction>,
    selfOverlap: SelfOverlap
)

Creates a BrushPaint with the given textureLayers.

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

List<BrushPaint.ColorFunction>

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

Cmn
SelfOverlap
Cmn
List<BrushPaint.TextureLayer>

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

Cmn

Public constructors

BrushPaint

BrushPaint(
    textureLayers: List<BrushPaint.TextureLayer> = emptyList(),
    colorFunctions: List<BrushPaint.ColorFunction> = emptyList(),
    selfOverlap: SelfOverlap = SelfOverlap.ANY
)

Creates a BrushPaint with the given textureLayers.

Parameters
textureLayers: List<BrushPaint.TextureLayer> = emptyList()

The textures to apply to the stroke.

colorFunctions: List<BrushPaint.ColorFunction> = emptyList()

The color functions to apply to the brush color.

selfOverlap: SelfOverlap = SelfOverlap.ANY

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

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

colorFunctions

val colorFunctionsList<BrushPaint.ColorFunction>

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.

selfOverlap

val selfOverlapSelfOverlap

textureLayers

val textureLayersList<BrushPaint.TextureLayer>

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