]> git.sesse.net Git - casparcg/blob - core/producer/text/utils/color.h
Merge branch '2.1.0' of https://github.com/CasparCG/Server into 2.1.0
[casparcg] / core / producer / text / utils / color.h
1 #pragma once
2
3 namespace caspar { namespace core { namespace text {
4
5 template<typename T>
6 struct color
7 {
8         color() {}
9         color(const color& other) : r(other.r), g(other.g), b(other.b), a(other.a) {}
10         color(T red, T green, T blue, T alpha) : r(red), g(green), b(blue), a(alpha) {}
11
12         const color&operator=(const color& other)
13         {
14                 r = other.r;
15                 g = other.g;
16                 b = other.b;
17                 a = other.a;
18
19                 return *this;
20         }
21
22         T r;
23         T g;
24         T b;
25         T a;
26 };
27
28 }}}