hb_paint_composite_mode_t

The values of this enumeration describe the compositing modes that can be used when combining temporary redirected drawing with the backdrop.

See the OpenType spec COLR section for details.

Values

ValueMeaning
Clear0

clear destination layer (bounded)

Src1

replace destination layer (bounded)

Dest2

ignore the source

SrcOver3

draw source layer on top of destination layer (bounded)

DestOver4

draw destination on top of source

SrcIn5

draw source where there was destination content (unbounded)

DestIn6

leave destination only where there was source content (unbounded)

SrcOut7

draw source where there was no destination content (unbounded)

DestOut8

leave destination only where there was no source content

SrcAtop9

draw source on top of destination content and only there

DestAtop10

leave destination on top of source content and only there (unbounded)

Xor11

source and destination are shown where there is only one of them

Plus12

source and destination layers are accumulated

Screen13

source and destination are complemented and multiplied. This causes the result to be at least as light as the lighter inputs.

Overlay14

multiplies or screens, depending on the lightness of the destination color.

Darken15

replaces the destination with the source if it is darker, otherwise keeps the source.

Lighten16

replaces the destination with the source if it is lighter, otherwise keeps the source.

ColorDodge17

brightens the destination color to reflect the source color.

ColorBurn18

darkens the destination color to reflect the source color.

HardLight19

Multiplies or screens, dependent on source color.

SoftLight20

Darkens or lightens, dependent on source color.

Difference21

Takes the difference of the source and destination color.

Exclusion22

Produces an effect similar to difference, but with lower contrast.

Multiply23

source and destination layers are multiplied. This causes the result to be at least as dark as the darker inputs.

HslHue24

Creates a color with the hue of the source and the saturation and luminosity of the target.

HslSaturation25

Creates a color with the saturation of the source and the hue and luminosity of the target. Painting with this mode onto a gray area produces no change.

HslColor26

Creates a color with the hue and saturation of the source and the luminosity of the target. This preserves the gray levels of the target and is useful for coloring monochrome images or tinting color images.

HslLuminosity27

Creates a color with the luminosity of the source and the hue and saturation of the target. This produces an inverse effect to @HB_PAINT_COMPOSITE_MODE_HSL_COLOR.