Tryst::SDL::BlendMode
Inherits Enum < Comparable < Value < Object
How a colour being drawn combines with what is already there.
Constants
Overwrite. The default, and the fastest.
Ordinary alpha blending - what "transparency" usually means.
Adds light, so overlapping draws get brighter. Fire, sparks.
Multiplies, so overlapping draws get darker. Shadows, tinting.
The premultiplied variants expect colour channels already scaled by alpha, which is what most image pipelines produce.
Constructors
Builds a BlendMode outside the fixed set above, from SDL's own lower-level srcdstop algebra - e.g. an inverse blend that makes white text invert whatever colour is behind it, so it stays readable over any background:
BlendMode.compose(:one_minus_dst_color, :one_minus_src_alpha, :add,
:zero, :one, :add)
Not every renderer backend supports every combination - SDL falls back to ordinary alpha blending where it does not.