|
9 | 9 | namespace opentimelineio { namespace OPENTIMELINEIO_VERSION { |
10 | 10 |
|
11 | 11 | Color::Color( |
12 | | - double const r, |
13 | | - double const g, |
14 | | - double const b, |
15 | | - double const a) |
16 | | - : _r(r), |
| 12 | + double const r, |
| 13 | + double const g, |
| 14 | + double const b, |
| 15 | + double const a, |
| 16 | + std::string const& name, |
| 17 | + AnyDictionary const& metadata) |
| 18 | + : Parent(name, metadata), |
| 19 | + _r(r), |
17 | 20 | _g(g), |
18 | 21 | _b(b), |
19 | 22 | _a(a) {} |
20 | 23 |
|
21 | | -Color::Color(Color const& other) : _r(other.r()), |
| 24 | +Color::Color(Color const& other) : Parent(other.name(), other.metadata()), |
| 25 | + _r(other.r()), |
22 | 26 | _g(other.g()), |
23 | 27 | _b(other.b()), |
24 | 28 | _a(other.a()) {} |
25 | 29 |
|
26 | | -const Color Color::pink(1.0, 0.0, 1.0, 1.0); |
27 | | -const Color Color::red(1.0, 0.0, 0.0, 1.0); |
28 | | -const Color Color::orange(1.0, 0.5, 0.0, 1.0); |
29 | | -const Color Color::yellow(1.0, 1.0, 0.0, 1.0); |
30 | | -const Color Color::green(0.0, 1.0, 0.0, 1.0); |
31 | | -const Color Color::cyan(0.0, 1.0, 1.0, 1.0); |
32 | | -const Color Color::blue(0.0, 0.0, 1.0, 1.0); |
33 | | -const Color Color::purple(0.5, 0.0, 0.5, 1.0); |
34 | | -const Color Color::magenta(1.0, 0.0, 1.0, 1.0); |
35 | | -const Color Color::black(0.0, 0.0, 0.0, 1.0); |
36 | | -const Color Color::white(1.0, 1.0, 1.0, 1.0); |
37 | | -const Color Color::transparent(0.0, 0.0, 0.0, 0.0); |
| 30 | +const Color Color::pink(1.0, 0.0, 1.0, 1.0, "Pink"); |
| 31 | +const Color Color::red(1.0, 0.0, 0.0, 1.0, "Red"); |
| 32 | +const Color Color::orange(1.0, 0.5, 0.0, 1.0, "Orange"); |
| 33 | +const Color Color::yellow(1.0, 1.0, 0.0, 1.0, "Yellow"); |
| 34 | +const Color Color::green(0.0, 1.0, 0.0, 1.0, "Green"); |
| 35 | +const Color Color::cyan(0.0, 1.0, 1.0, 1.0, "Cyan"); |
| 36 | +const Color Color::blue(0.0, 0.0, 1.0, 1.0, "Blue"); |
| 37 | +const Color Color::purple(0.5, 0.0, 0.5, 1.0, "Purple"); |
| 38 | +const Color Color::magenta(1.0, 0.0, 1.0, 1.0, "Magenta"); |
| 39 | +const Color Color::black(0.0, 0.0, 0.0, 1.0, "Black"); |
| 40 | +const Color Color::white(1.0, 1.0, 1.0, 1.0, "White"); |
| 41 | +const Color Color::transparent(0.0, 0.0, 0.0, 0.0, "Transparent"); |
38 | 42 |
|
39 | 43 | std::string |
40 | 44 | Color::to_hex() |
|
0 commit comments