BlendMode

List of blending modes available for the annotations that can be set by setBlendMode.

Entries

Link copied to clipboard

B(cb,cs) = cs Selects the source colour, ignoring the backdrop.

Link copied to clipboard

B(cb,cs) = cb×cs Multiplies the backdrop and source colour values. The result colour is always at least as dark as either of the two constituent colours. Multiplying any colour with black produces black; multiplying with white leaves the original colour unchanged. Painting successive overlapping objects with a colour other than black or white produces progressively darker colours.

Link copied to clipboard

B(cb,cs) = 1 – [(1–cb)×(1–cs)] = cb + cs – (cb × cs) Multiplies the complements of the backdrop and source colour values, then complements the result. The result colour is always at least as light as either of the two constituent colours. Screening any colour with white produces white; screening with black leaves the original colour unchanged. The effect is similar to projecting multiple photographic slides simultaneously onto a single screen.

Link copied to clipboard

B(cb, cs) = HardLight(cs, cb) Multiplies or screens the colours, depending on the backdrop colour value. Source colours overlay the backdrop while preserving its highlights and shadows. The backdrop colour is not replaced but is mixed with the source colour to reflect the lightness or darkness of the backdrop.

Link copied to clipboard

B(cb, cs) = min(cb, cs) Selects the darker of the backdrop and source colours. The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.

Link copied to clipboard

B(cb, cs) = max(cb, cs) Selects the lighter of the backdrop and source colours. The backdrop is replaced with the source where the source is lighter; otherwise, it is left unchanged.

Link copied to clipboard

Brightens the backdrop colour to reflect the source colour. Painting with black produces no changes.

Link copied to clipboard

Darkens the backdrop colour to reflect the source colour. Painting with white produces no change.

Link copied to clipboard

Darkens or lightens the colours, depending on the source colour value. The effect is similar to shining a diffused spotlight on the backdrop.

Link copied to clipboard

Multiplies or screens the colours, depending on the source colour value. The effect is similar to shining a harsh spotlight on the backdrop.

Link copied to clipboard

B(cb,cs) = cb–cs Subtracts the darker of the two constituent colours from the lighter colour: Painting with white inverts the backdrop colour; painting with black produces no change.

Link copied to clipboard

B(cb,cs) = cb+cs–2×cb×cs Produces an effect similar to that of the Difference mode but lower in contrast. Painting with white inverts the backdrop colour; painting with black produces no change.

Functions

Link copied to clipboard
open fun valueOf(name: String): BlendMode

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
open fun values(): Array<BlendMode>

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.