Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_color.hh
| Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | if constexpr (Alpha == eAlpha::Premultiplied) { | ||||
| ColorSceneLinear4f<eAlpha::Straight> straighten; | ColorSceneLinear4f<eAlpha::Straight> straighten; | ||||
| premul_to_straight_v4_v4(straighten, *this); | premul_to_straight_v4_v4(straighten, *this); | ||||
| return straighten; | return straighten; | ||||
| } | } | ||||
| else { | else { | ||||
| return *this; | return *this; | ||||
| } | } | ||||
| } | } | ||||
| friend std::ostream &operator<<(std::ostream &stream, | |||||
| const ColorSceneLinear4f<Alpha> &color_scene_linear) | |||||
| { | |||||
| stream << "(" << color_scene_linear.r << ", " << color_scene_linear.g << ", " | |||||
| << color_scene_linear.b << ", " << color_scene_linear.a << ")"; | |||||
| return stream; | |||||
| } | |||||
| }; | }; | ||||
| template<eAlpha Alpha> | template<eAlpha Alpha> | ||||
| class ColorSceneLinearByteEncoded4b final | class ColorSceneLinearByteEncoded4b final | ||||
| : public ColorRGBA<uint8_t, eSpace::SceneLinearByteEncoded, Alpha> { | : public ColorRGBA<uint8_t, eSpace::SceneLinearByteEncoded, Alpha> { | ||||
| public: | public: | ||||
| constexpr ColorSceneLinearByteEncoded4b() = default; | constexpr ColorSceneLinearByteEncoded4b() = default; | ||||
| ▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines | |||||