Blending modes.
Types
BlendMode = enum bmNormal, bmDarken, bmMultiply, bmColorBurn, bmLighten, bmScreen, bmColorDodge, bmOverlay, bmSoftLight, bmHardLight, bmDifference, bmExclusion, bmHue, bmSaturation, bmColor, bmLuminosity, bmMask, ## Special blend mode that is used for masking bmOverwrite, ## Special blend mode that just copies pixels bmSubtractMask, ## Inverse mask bmIntersectMask, bmExcludeMask
Blender = proc (backdrop, source: ColorRGBA): ColorRGBA
Masker = proc (backdrop, source: uint8): uint8
BlenderSimd = proc (blackdrop, source: M128i): M128i
MaskerSimd = proc (blackdrop, source: M128i): M128i
Procs
proc blendAlpha(backdrop, source: uint8): uint8 {...}{.inline, raises: [], tags: [].}
proc blender(blendMode: BlendMode): Blender {...}{.raises: [], tags: [].}
proc masker(blendMode: BlendMode): Masker {...}{.raises: [PixieError], tags: [].}
proc packAlphaValues(v: M128i): M128i {...}{.inline, raises: [], tags: [].}
- Shuffle the alpha values for these 4 colors to the first 4 bytes
proc unpackAlphaValues(v: M128i): M128i {...}{.inline, raises: [], tags: [].}
- Unpack the first 32 bits into 4 rgba(0, 0, 0, value)
proc blenderSimd(blendMode: BlendMode): BlenderSimd {...}{.raises: [PixieError], tags: [].}
proc hasSimdBlender(blendMode: BlendMode): bool {...}{.raises: [], tags: [].}
proc maskerSimd(blendMode: BlendMode): MaskerSimd {...}{.raises: [PixieError], tags: [].}
proc hasSimdMasker(blendMode: BlendMode): bool {...}{.raises: [], tags: [].}