|
Blender V5.0
|
Classes | |
| struct | ByteTraits |
| struct | FloatTraits |
| struct | TraitsType |
| struct | TraitsType< ColorPaint4f > |
| struct | TraitsType< ColorPaint4b > |
Typedefs | |
| template<typename T> | |
| using | Traits = typename TraitsType<T>::type |
Functions | |
| BLI_INLINE ColorTheme4b | to_byte (const ColorTheme4f &theme4f) |
| BLI_INLINE ColorTheme4b | to_byte (const ColorTheme4b &theme4b) |
| template<eAlpha Alpha> | |
| BLI_INLINE ColorSceneLinearByteEncoded4b< Alpha > | encode (const ColorSceneLinear4f< Alpha > &color) |
| BLI_INLINE ColorTheme4f | to_float (const ColorTheme4b &theme4b) |
| BLI_INLINE ColorTheme4f | to_float (const ColorTheme4f &theme4f) |
| template<eAlpha Alpha> | |
| BLI_INLINE ColorSceneLinear4f< Alpha > | decode (const ColorSceneLinearByteEncoded4b< Alpha > &color) |
| template<eAlpha Alpha> | |
| ColorSceneLinear4f< eAlpha::Premultiplied > | premultiply_alpha (const ColorSceneLinear4f< Alpha > &color) |
| template<eAlpha Alpha> | |
| ColorSceneLinear4f< eAlpha::Straight > | unpremultiply_alpha (const ColorSceneLinear4f< Alpha > &color) |
| BLI_INLINE ColorSceneLinear4f< eAlpha::Straight > | to_scene_linear (const ColorTheme4f &theme4f) |
| BLI_INLINE ColorSceneLinear4f< eAlpha::Straight > | to_scene_linear (const ColorTheme4b &theme4b) |
| BLI_INLINE ColorTheme4f | to_theme4f (const ColorSceneLinear4f< eAlpha::Straight > &scene_linear) |
| BLI_INLINE ColorTheme4b | to_theme4b (const ColorSceneLinear4f< eAlpha::Straight > &scene_linear) |
| static float | get_luminance (ColorPaint4f c) |
| static int | get_luminance (ColorPaint4b c) |
Color Blending Modes | |
| template<typename Color, typename Traits> | |
| static Color | mix_blend (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_add (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_sub (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_mul (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_lighten (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_darken (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_colordodge (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_difference (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_screen (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_hardlight (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_overlay (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_softlight (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_exclusion (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_luminosity (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_saturation (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_hue (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_alpha_add (Color col_src, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_alpha_sub (Color col_src, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_pinlight (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_linearlight (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_vividlight (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_color (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_colorburn (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| static Color | mix_linearburn (Color col_src, Color col_dst, typename Traits::BlendType fac) |
| template<typename Color, typename Traits> | |
| BLI_INLINE Color | BLI_mix_colors (const IMB_BlendMode tool, const Color a, const Color b, const typename Traits::BlendType alpha) |
| using blender::color::Traits = typename TraitsType<T>::type |
Definition at line 99 of file BLI_color_mix.hh.
| BLI_INLINE Color blender::color::BLI_mix_colors | ( | const IMB_BlendMode | tool, |
| const Color | a, | ||
| const Color | b, | ||
| const typename Traits::BlendType | alpha ) |
Definition at line 1003 of file BLI_color_mix.hh.
References b, BLI_assert_unreachable, BLI_INLINE, Color, IMB_BLEND_ADD, IMB_BLEND_ADD_ALPHA, IMB_BLEND_COLOR, IMB_BLEND_COLORBURN, IMB_BLEND_COLORDODGE, IMB_BLEND_DARKEN, IMB_BLEND_DIFFERENCE, IMB_BLEND_ERASE_ALPHA, IMB_BLEND_EXCLUSION, IMB_BLEND_HARDLIGHT, IMB_BLEND_HUE, IMB_BLEND_LIGHTEN, IMB_BLEND_LINEARLIGHT, IMB_BLEND_LUMINOSITY, IMB_BLEND_MIX, IMB_BLEND_MUL, IMB_BLEND_OVERLAY, IMB_BLEND_PINLIGHT, IMB_BLEND_SATURATION, IMB_BLEND_SCREEN, IMB_BLEND_SOFTLIGHT, IMB_BLEND_SUB, IMB_BLEND_VIVIDLIGHT, mix_add(), mix_alpha_add(), mix_alpha_sub(), mix_blend(), mix_color(), mix_colorburn(), mix_colordodge(), mix_darken(), mix_difference(), mix_exclusion(), mix_hardlight(), mix_hue(), mix_lighten(), mix_linearlight(), mix_luminosity(), mix_mul(), mix_overlay(), mix_pinlight(), mix_saturation(), mix_screen(), mix_softlight(), mix_sub(), and mix_vividlight().
Referenced by vpaint_blend(), and vpaint_blend_stroke().
| BLI_INLINE ColorSceneLinear4f< Alpha > blender::color::decode | ( | const ColorSceneLinearByteEncoded4b< Alpha > & | color | ) |
Definition at line 77 of file BLI_color.hh.
References BLI_INLINE, copy_v3_v3(), blender::colorspace::rec709_to_scene_linear, blender::colorspace::scene_linear_is_rec709, and srgb_to_linearrgb_uchar4().
Referenced by blender::bke::byte_color_to_color(), blender::bke::byte_color_to_float(), blender::bke::byte_color_to_float2(), blender::bke::byte_color_to_float3(), blender::bke::byte_color_to_float4(), blender::bke::byte_color_to_int(), blender::bke::byte_color_to_int8(), blender::io::usd::detail::convert_value(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::io::ply::load_custom_attributes(), blender::ed::geometry::rna_property_for_attribute_type_set_value(), blender::tests::TEST(), toFloat(), and transform_active_color_data().
| BLI_INLINE ColorSceneLinearByteEncoded4b< Alpha > blender::color::encode | ( | const ColorSceneLinear4f< Alpha > & | color | ) |
Definition at line 50 of file BLI_color.hh.
References BLI_INLINE, copy_v3_v3(), linearrgb_to_srgb_uchar4(), blender::colorspace::scene_linear_is_rec709, blender::colorspace::scene_linear_to_rec709, and blender::VecBase< T, Size >::xyz().
Referenced by blender::bke::bool_to_byte_color(), blender::bke::color_to_byte_color(), blender::ed::sculpt_paint::fill_mesh_color(), blender::bke::float2_to_byte_color(), blender::bke::float3_to_byte_color(), blender::bke::float4_to_byte_color(), blender::bke::float_to_byte_color(), fromFloat(), blender::bke::int2_to_byte_color(), blender::bke::int8_to_byte_color(), blender::bke::int_to_byte_color(), blender::ed::geometry::rna_property_for_attribute_type_retrieve_value(), blender::bke::short2_to_byte_color(), blender::tests::TEST(), and transform_active_color_data().
|
inlinestatic |
Definition at line 106 of file BLI_color_mix.hh.
References IMB_colormanagement_get_luminance_byte(), and blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r.
|
inlinestatic |
Definition at line 101 of file BLI_color_mix.hh.
References IMB_colormanagement_get_luminance(), and blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r.
Referenced by mix_darken(), and mix_lighten().
|
static |
|
static |
|
static |
|
static |
Definition at line 118 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
|
static |
Definition at line 887 of file BLI_color_mix.hh.
References b, Color, hsv_to_rgb(), rgb_to_hsv(), and v2.
Referenced by BLI_mix_colors().
|
static |
Definition at line 937 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
|
static |
|
static |
Definition at line 288 of file BLI_color_mix.hh.
References Color, and get_luminance().
Referenced by BLI_mix_colors().
|
static |
Definition at line 365 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
|
static |
Definition at line 541 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
|
static |
Definition at line 435 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
|
static |
Definition at line 667 of file BLI_color_mix.hh.
References b, Color, hsv_to_rgb(), rgb_to_hsv(), and v2.
Referenced by BLI_mix_colors().
|
static |
Definition at line 251 of file BLI_color_mix.hh.
References Color, and get_luminance().
Referenced by BLI_mix_colors().
|
static |
Definition at line 972 of file BLI_color_mix.hh.
|
static |
Definition at line 800 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
|
static |
Definition at line 572 of file BLI_color_mix.hh.
References b, Color, hsv_to_rgb(), rgb_to_hsv(), and v2.
Referenced by BLI_mix_colors().
|
static |
|
static |
Definition at line 470 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
|
static |
Definition at line 760 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
|
static |
Definition at line 619 of file BLI_color_mix.hh.
References b, Color, EPS_SATURATION, hsv_to_rgb(), rgb_to_hsv(), and v2.
Referenced by BLI_mix_colors().
|
static |
|
static |
Definition at line 505 of file BLI_color_mix.hh.
References add(), Color, and i.
Referenced by BLI_mix_colors().
|
static |
|
static |
Definition at line 840 of file BLI_color_mix.hh.
Referenced by BLI_mix_colors().
| ColorSceneLinear4f< eAlpha::Premultiplied > blender::color::premultiply_alpha | ( | const ColorSceneLinear4f< Alpha > & | color | ) |
Convert color and alpha association to premultiplied alpha.
Does nothing when color already has a premultiplied alpha.
Definition at line 93 of file BLI_color.hh.
References blender::Straight, and straight_to_premul_v4_v4().
Referenced by imb_working_space_convert(), blender::tests::TEST(), and blender::tests::TEST().
| BLI_INLINE ColorTheme4b blender::color::to_byte | ( | const ColorTheme4b & | theme4b | ) |
Definition at line 44 of file BLI_color.hh.
References BLI_INLINE.
| BLI_INLINE ColorTheme4b blender::color::to_byte | ( | const ColorTheme4f & | theme4f | ) |
Change precision of color to uint8_t.
Definition at line 37 of file BLI_color.hh.
References BLI_INLINE, and rgba_float_to_uchar().
Referenced by blender::tests::TEST().
| BLI_INLINE ColorTheme4f blender::color::to_float | ( | const ColorTheme4b & | theme4b | ) |
Change precision of color to float.
Definition at line 64 of file BLI_color.hh.
References BLI_INLINE, and rgba_uchar_to_float().
Referenced by blender::tests::TEST().
| BLI_INLINE ColorTheme4f blender::color::to_float | ( | const ColorTheme4f & | theme4f | ) |
Definition at line 71 of file BLI_color.hh.
References BLI_INLINE.
| BLI_INLINE ColorSceneLinear4f< eAlpha::Straight > blender::color::to_scene_linear | ( | const ColorTheme4b & | theme4b | ) |
Definition at line 133 of file BLI_color.hh.
References BLI_INLINE, and srgb_to_linearrgb_uchar4().
| BLI_INLINE ColorSceneLinear4f< eAlpha::Straight > blender::color::to_scene_linear | ( | const ColorTheme4f & | theme4f | ) |
Convert between theme and scene linear colors.
Definition at line 126 of file BLI_color.hh.
References BLI_INLINE, and srgb_to_linearrgb_v4().
Referenced by blender::tests::TEST().
| BLI_INLINE ColorTheme4b blender::color::to_theme4b | ( | const ColorSceneLinear4f< eAlpha::Straight > & | scene_linear | ) |
Definition at line 147 of file BLI_color.hh.
References BLI_INLINE, and linearrgb_to_srgb_uchar4().
Referenced by blender::tests::TEST(), and blender::tests::TEST().
| BLI_INLINE ColorTheme4f blender::color::to_theme4f | ( | const ColorSceneLinear4f< eAlpha::Straight > & | scene_linear | ) |
Definition at line 140 of file BLI_color.hh.
References BLI_INLINE, and linearrgb_to_srgb_v4().
Referenced by blender::tests::TEST(), and blender::tests::TEST().
| ColorSceneLinear4f< eAlpha::Straight > blender::color::unpremultiply_alpha | ( | const ColorSceneLinear4f< Alpha > & | color | ) |
Convert color and alpha association to straight alpha.
Does nothing when color has straight alpha.
Definition at line 111 of file BLI_color.hh.
References premul_to_straight_v4_v4(), and blender::Premultiplied.
Referenced by imb_working_space_convert(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().