Blender
V4.3
source
blender
blenlib
intern
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
5
#include "
BLI_color.hh
"
6
7
#include <ostream>
8
9
namespace
blender
{
10
11
std::ostream &
operator<<
(std::ostream &stream,
const
eAlpha
&space)
12
{
13
switch
(space) {
14
case
eAlpha::Straight
: {
15
stream <<
"Straight"
;
16
break
;
17
}
18
case
eAlpha::Premultiplied
: {
19
stream <<
"Premultiplied"
;
20
break
;
21
}
22
}
23
return
stream;
24
}
25
26
std::ostream &
operator<<
(std::ostream &stream,
const
eSpace
&space)
27
{
28
switch
(space) {
29
case
eSpace::Theme
: {
30
stream <<
"Theme"
;
31
break
;
32
}
33
case
eSpace::SceneLinear
: {
34
stream <<
"SceneLinear"
;
35
break
;
36
}
37
case
eSpace::SceneLinearByteEncoded
: {
38
stream <<
"SceneLinearByteEncoded"
;
39
break
;
40
}
41
}
42
return
stream;
43
}
44
45
template
<
typename
ChannelStorageType, eSpace Space, eAlpha Alpha>
46
std::ostream &
operator<<
(std::ostream &stream,
47
const
ColorRGBA<ChannelStorageType, Space, Alpha>
&c)
48
{
49
stream <<
Space
<< Alpha <<
"("
<< c.
r
<<
", "
<< c.
g
<<
", "
<< c.
b
<<
", "
<< c.
a
<<
")"
;
50
return
stream;
51
}
52
53
template
std::ostream &
operator<<
(
54
std::ostream &stream,
const
ColorRGBA<float, eSpace::SceneLinear, eAlpha::Premultiplied>
&c);
55
template
std::ostream &
operator<<
(
56
std::ostream &stream,
const
ColorRGBA<float, eSpace::SceneLinear, eAlpha::Straight>
&c);
57
template
std::ostream &
operator<<
(
58
std::ostream &stream,
59
const
ColorRGBA<uint8_t, eSpace::SceneLinearByteEncoded, eAlpha::Premultiplied>
&c);
60
template
std::ostream &
operator<<
(
61
std::ostream &stream,
62
const
ColorRGBA<uint8_t, eSpace::SceneLinearByteEncoded, eAlpha::Straight>
&c);
63
64
}
// namespace blender
BLI_color.hh
LayoutSeparatorType::Space
@ Space
blender::ColorRGBA
Definition
BLI_color.hh:86
blender::ColorRGBA::r
ChannelStorageType r
Definition
BLI_color.hh:88
blender::ColorRGBA::g
ChannelStorageType g
Definition
BLI_color.hh:88
blender::ColorRGBA::b
ChannelStorageType b
Definition
BLI_color.hh:88
blender::ColorRGBA::a
ChannelStorageType a
Definition
BLI_color.hh:88
blender
Definition
ANIM_action.hh:36
blender::operator<<
std::ostream & operator<<(std::ostream &stream, const eAlpha &space)
Definition
BLI_color.cc:11
blender::eSpace
eSpace
Definition
BLI_color.hh:75
blender::eSpace::SceneLinearByteEncoded
@ SceneLinearByteEncoded
blender::eSpace::SceneLinear
@ SceneLinear
blender::eSpace::Theme
@ Theme
blender::eAlpha
eAlpha
Definition
BLI_color.hh:66
blender::eAlpha::Premultiplied
@ Premultiplied
blender::eAlpha::Straight
@ Straight
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0