Euphoria
rgb_blend.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "base/rgb.h"
4 
5 namespace eu::core
6 {
7  enum class BlendMode
8  {
9  normal,
10  lighten,
11  darken,
12  multiply,
13  average,
14  add,
15  subtract,
16  difference,
17  negation,
18  screen,
19  exclusion,
20  overlay,
21  soft_light,
22  hard_light,
24  color_burn,
29  pin_light,
30  hard_mix,
31  reflect,
32  glow,
33  phoenix
34  };
35 
36  // place top onto bottom
37  Rgb blend(const Rgb& top, const Rgb& bottom, BlendMode mode = BlendMode::normal);
38  Rgba blend(const Rgba& top, const Rgba& bottom, BlendMode mode = BlendMode::normal);
39  Rgbi blend(const Rgbi& top, const Rgbi& bottom, BlendMode mode = BlendMode::normal);
40  Rgbai blend(const Rgbai& top, const Rgbai& bottom, BlendMode mode = BlendMode::normal);
41 
42  // rgb Blend(const Rgb& a, const Rgb& b, float alpha, const BlendMode mode = BlendMode::Normal);
43  // rgba Blend(const Rgba& a, const Rgba& b, float alpha, const BlendMode mode = BlendMode::Normal);
44  // rgbi Blend(const Rgbi& a, const Rgbi& b, float alpha, const BlendMode mode = BlendMode::Normal);
45  // Rgbdai Blend(const Rgbai& a, const Rgbai& b, float alpha, const BlendMode mode = BlendMode::Normal);
46 }
Rgb blend(const Rgb &top, const Rgb &bottom, BlendMode mode)
Definition: rgb_blend.cc:402
Definition: rgb.h:62
Definition: rgb.h:143
Definition: rgb.h:45
Definition: rgb.h:26