BrushPaint.TextureLayer.BlendMode



The method by which the combined texture layers (index <= i) are blended with the next layer. The blend mode on the final layer controls how the combined texture is blended with the brush color, and should typically be a mode whose output alpha is proportional to the destination alpha, so that it can be adjusted by anti-aliasing.

Summary

Public companion properties

BrushPaint.TextureLayer.BlendMode

Keeps the destination pixels and discards the source pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

Discards destination pixels that aren't covered by source pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

Keeps destination pixels that cover source pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

Keeps the destination pixels not covered by source pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

The source pixels are drawn behind the destination pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

Source and destination are component-wise multiplied, including opacity.

Cmn
BrushPaint.TextureLayer.BlendMode

Keeps the source pixels and discards the destination pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

Discards source pixels that do not cover destination pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

Keeps the source pixels that cover destination pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

Keeps the source pixels that do not cover destination pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

The source pixels are drawn over the destination pixels.

Cmn
BrushPaint.TextureLayer.BlendMode

Discards source and destination pixels that intersect; keeps source and destination pixels that do not intersect.

Cmn

Public functions

open String
Cmn

Public companion properties

DST

val DSTBrushPaint.TextureLayer.BlendMode

Keeps the destination pixels and discards the source pixels.

Alpha = Alpha_dst
Color
= Color_dst

This mode is unlikely to be useful, since it effectively causes the renderer to just ignore this TextureLayer and all layers before it, but it is included for completeness.

DST_ATOP

val DST_ATOPBrushPaint.TextureLayer.BlendMode

Discards destination pixels that aren't covered by source pixels. Remaining destination pixels are drawn over source pixels.

Alpha = Alpha_src
Color
= Alpha_src * Color_dst + (1 - Alpha_dst) * Color_src

This mode shouldn't normally be used for the final TextureLayer, since its output alpha is not proportional to the destination alpha (so it wouldn't preserve alpha adjustments from anti-aliasing).

DST_IN

val DST_INBrushPaint.TextureLayer.BlendMode

Keeps destination pixels that cover source pixels. Discards remaining source and destination pixels.

Alpha = Alpha_src * Alpha_dst
Color
= Alpha_src * Color_dst

DST_OUT

val DST_OUTBrushPaint.TextureLayer.BlendMode

Keeps the destination pixels not covered by source pixels. Discards destination pixels that are covered by source pixels and all source pixels.

Alpha = (1 - Alpha_src) * Alpha_dst
Color
= (1 - Alpha_src) * Color_dst

DST_OVER

val DST_OVERBrushPaint.TextureLayer.BlendMode

The source pixels are drawn behind the destination pixels.

Alpha = Alpha_dst + (1 - Alpha_dst) * Alpha_src
Color
= Color_dst + (1 - Alpha_dst) * Color_src

This mode shouldn't normally be used for the final TextureLayer, since its output alpha is not proportional to the destination alpha (so it wouldn't preserve alpha adjustments from anti-aliasing).

MODULATE

val MODULATEBrushPaint.TextureLayer.BlendMode

Source and destination are component-wise multiplied, including opacity.

Alpha = Alpha_src * Alpha_dst
Color
= Color_src * Color_dst

SRC

val SRCBrushPaint.TextureLayer.BlendMode

Keeps the source pixels and discards the destination pixels.

Alpha = Alpha_src
Color
= Color_src

This mode shouldn't normally be used for the final TextureLayer, since its output alpha is not proportional to the destination alpha (so it wouldn't preserve alpha adjustments from anti-aliasing).

SRC_ATOP

val SRC_ATOPBrushPaint.TextureLayer.BlendMode

Discards source pixels that do not cover destination pixels. Draws remaining pixels over destination pixels.

Alpha = Alpha_dst
Color
= Alpha_dst * Color_src + (1 - Alpha_src) * Color_dst

SRC_IN

val SRC_INBrushPaint.TextureLayer.BlendMode

Keeps the source pixels that cover destination pixels. Discards remaining source and destination pixels.

Alpha = Alpha_src * Alpha_dst
Color
= Color_src * Alpha_dst

SRC_OUT

val SRC_OUTBrushPaint.TextureLayer.BlendMode

Keeps the source pixels that do not cover destination pixels. Discards destination pixels and all source pixels that cover destination pixels.

Alpha = (1 - Alpha_dst) * Alpha_src
Color
= (1 - Alpha_dst) * Color_src

This mode shouldn't normally be used for the final TextureLayer, since its output alpha is not proportional to the destination alpha (so it wouldn't preserve alpha adjustments from anti-aliasing).

SRC_OVER

val SRC_OVERBrushPaint.TextureLayer.BlendMode

The source pixels are drawn over the destination pixels.

Alpha = Alpha_src + (1 - Alpha_src) * Alpha_dst
Color
= Color_src + (1 - Alpha_src) * Color_dst

This mode shouldn't normally be used for the final TextureLayer, since its output alpha is not proportional to the destination alpha (so it wouldn't preserve alpha adjustments from anti-aliasing).

XOR

val XORBrushPaint.TextureLayer.BlendMode

Discards source and destination pixels that intersect; keeps source and destination pixels that do not intersect.

Alpha = (1 - Alpha_dst) * Alpha_src + (1 - Alpha_src) * Alpha_dst
Color
= (1 - Alpha_dst) * Color_src + (1 - Alpha_src) * Color_dst

This mode shouldn't normally be used for the final TextureLayer, since its output alpha is not proportional to the destination alpha (so it wouldn't preserve alpha adjustments from anti-aliasing).

Public functions

toString

open fun toString(): String