Blender V4.3
blender::ColorSceneLinear4f< Alpha > Class Template Referencefinal

#include <BLI_color.hh>

Inherits blender::ColorRGBA< float, eSpace::SceneLinear, Alpha >.

Public Member Functions

constexpr ColorSceneLinear4f ()=default
 
constexpr ColorSceneLinear4f (const float *rgba)
 
constexpr ColorSceneLinear4f (float r, float g, float b, float a)
 
ColorSceneLinearByteEncoded4b< Alpha > encode () const
 
ColorSceneLinear4f< eAlpha::Premultipliedpremultiply_alpha () const
 
ColorSceneLinear4f< eAlpha::Straightunpremultiply_alpha () const
 
- Public Member Functions inherited from blender::ColorRGBA< float, eSpace::SceneLinear, Alpha >
constexpr ColorRGBA ()=default
 
constexpr ColorRGBA (const float rgba[4])
 
constexpr ColorRGBA (const float r, const float g, const float b, const float a)
 
 operator float * ()
 
 operator const float * () const
 
uint64_t hash () const
 

Additional Inherited Members

- Public Attributes inherited from blender::ColorRGBA< float, eSpace::SceneLinear, Alpha >
float r
 
float g
 
float b
 
float a
 

Detailed Description

template<eAlpha Alpha>
class blender::ColorSceneLinear4f< Alpha >

Definition at line 146 of file BLI_color.hh.

Constructor & Destructor Documentation

◆ ColorSceneLinear4f() [1/3]

template<eAlpha Alpha>
blender::ColorSceneLinear4f< Alpha >::ColorSceneLinear4f ( )
constexprdefault

◆ ColorSceneLinear4f() [2/3]

template<eAlpha Alpha>
blender::ColorSceneLinear4f< Alpha >::ColorSceneLinear4f ( const float * rgba)
inlineconstexpr

Definition at line 150 of file BLI_color.hh.

◆ ColorSceneLinear4f() [3/3]

template<eAlpha Alpha>
blender::ColorSceneLinear4f< Alpha >::ColorSceneLinear4f ( float r,
float g,
float b,
float a )
inlineconstexpr

Definition at line 155 of file BLI_color.hh.

Member Function Documentation

◆ encode()

◆ premultiply_alpha()

template<eAlpha Alpha>
ColorSceneLinear4f< eAlpha::Premultiplied > blender::ColorSceneLinear4f< Alpha >::premultiply_alpha ( ) const
inline

Convert color and alpha association to premultiplied alpha.

Does nothing when color already has a premultiplied alpha.

Definition at line 175 of file BLI_color.hh.

References blender::Straight, and straight_to_premul_v4_v4().

Referenced by blender::tests::TEST(), blender::tests::TEST(), and blender::compositor::ConvertStraightToPremulOperation::update_memory_buffer_partial().

◆ unpremultiply_alpha()

template<eAlpha Alpha>
ColorSceneLinear4f< eAlpha::Straight > blender::ColorSceneLinear4f< Alpha >::unpremultiply_alpha ( ) const
inline

Convert color and alpha association to straight alpha.

Does nothing when color has straight alpha.

Definition at line 192 of file BLI_color.hh.

References premul_to_straight_v4_v4(), and blender::Premultiplied.

Referenced by blender::tests::TEST(), and blender::compositor::ConvertPremulToStraightOperation::update_memory_buffer_partial().


The documentation for this class was generated from the following file: