tiny-skia-cpp
A C++20 2D rendering library (port of tiny-skia)
Loading...
Searching...
No Matches
BlendMode.h File Reference

Porter-Duff and advanced blend modes. More...

#include <optional>
#include "tiny_skia/Color.h"
Include dependency graph for BlendMode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  tiny_skia::BlendMode {
  Clear , Source , Destination , SourceOver ,
  DestinationOver , SourceIn , DestinationIn , SourceOut ,
  DestinationOut , SourceAtop , DestinationAtop , Xor ,
  Plus , Modulate , Screen , Overlay ,
  Darken , Lighten , ColorDodge , ColorBurn ,
  HardLight , SoftLight , Difference , Exclusion ,
  Multiply , Hue , Saturation , Color ,
  Luminosity
}
 Blend mode for compositing source over destination. Includes Porter-Duff modes and advanced (separable/non-separable) blend modes. More...
 

Enumeration Type Documentation

◆ BlendMode

enum class tiny_skia::BlendMode
strong
Enumerator
Clear 

Output is transparent.

Source 

Output is source only.

Destination 

Output is destination only.

SourceOver 

Source over destination (default).

DestinationOver 

Destination over source.

SourceIn 

Source where destination is opaque.

DestinationIn 

Destination where source is opaque.

SourceOut 

Source where destination is transparent.

DestinationOut 

Destination where source is transparent.

SourceAtop 

Source atop destination.

DestinationAtop 

Destination atop source.

Xor 

Source XOR destination.

Plus 

Sum (clamped).

Modulate 

Component-wise multiply.

Screen 

Inverse multiply.

Overlay 

Multiply or screen based on destination.

Darken 

Minimum of source and destination.

Lighten 

Maximum of source and destination.

ColorDodge 

Brighten destination toward source.

ColorBurn 

Darken destination toward source.

HardLight 

Multiply or screen based on source.

SoftLight 

Soft version of hard light.

Difference 

Absolute difference.

Exclusion 

Similar to Difference but lower contrast.

Multiply 

Component-wise multiply (with alpha handling).

Hue 

Source hue, destination saturation and luminosity.

Saturation 

Source saturation, destination hue and luminosity.

Color 

Source hue and saturation, destination luminosity.

Luminosity 

Source luminosity, destination hue and saturation.