Blender V5.0
BLI_color.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "BLI_color.hh"
10
11#include <ostream>
12
13namespace blender {
14
15std::ostream &operator<<(std::ostream &stream, const eAlpha &space)
16{
17 switch (space) {
18 case eAlpha::Straight: {
19 stream << "Straight";
20 break;
21 }
23 stream << "Premultiplied";
24 break;
25 }
26 }
27 return stream;
28}
29
30std::ostream &operator<<(std::ostream &stream, const eSpace &space)
31{
32 switch (space) {
33 case eSpace::Theme: {
34 stream << "Theme";
35 break;
36 }
38 stream << "SceneLinear";
39 break;
40 }
42 stream << "SceneLinearByteEncoded";
43 break;
44 }
45 }
46 return stream;
47}
48
49template<typename ChannelStorageType, eSpace Space, eAlpha Alpha>
50std::ostream &operator<<(std::ostream &stream,
52{
53 stream << Space << Alpha << "(" << c.r << ", " << c.g << ", " << c.b << ", " << c.a << ")";
54 return stream;
55}
56
57template std::ostream &operator<<(
59template std::ostream &operator<<(
60 std::ostream &stream, const ColorRGBA<float, eSpace::SceneLinear, eAlpha::Straight> &c);
61template std::ostream &operator<<(std::ostream &stream,
63template std::ostream &operator<<(
64 std::ostream &stream,
66template std::ostream &operator<<(
67 std::ostream &stream,
69template std::ostream &operator<<(std::ostream &stream,
71
72} // namespace blender
ChannelStorageType r
ChannelStorageType g
ChannelStorageType b
ChannelStorageType a
std::ostream & operator<<(std::ostream &stream, const eAlpha &space)
Definition BLI_color.cc:15