|
Blender V5.3
|
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 1002 of file BLI_color_mix.hh.
References b, BLI_assert_unreachable, BLI_INLINE, BLI_mix_colors(), blender::IMB_BLEND_ADD, blender::IMB_BLEND_ADD_ALPHA, blender::IMB_BLEND_COLOR, blender::IMB_BLEND_COLORBURN, blender::IMB_BLEND_COLORDODGE, blender::IMB_BLEND_DARKEN, blender::IMB_BLEND_DIFFERENCE, blender::IMB_BLEND_ERASE_ALPHA, blender::IMB_BLEND_EXCLUSION, blender::IMB_BLEND_HARDLIGHT, blender::IMB_BLEND_HUE, blender::IMB_BLEND_LIGHTEN, blender::IMB_BLEND_LINEARBURN, blender::IMB_BLEND_LINEARLIGHT, blender::IMB_BLEND_LUMINOSITY, blender::IMB_BLEND_MIX, blender::IMB_BLEND_MUL, blender::IMB_BLEND_OVERLAY, blender::IMB_BLEND_PINLIGHT, blender::IMB_BLEND_SATURATION, blender::IMB_BLEND_SCREEN, blender::IMB_BLEND_SOFTLIGHT, blender::IMB_BLEND_SUB, blender::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_linearburn(), mix_linearlight(), mix_luminosity(), mix_mul(), mix_overlay(), mix_pinlight(), mix_saturation(), mix_screen(), mix_softlight(), mix_sub(), and mix_vividlight().
Referenced by BLI_mix_colors(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), blender::vpaint_blend(), and blender::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, blender::copy_v3_v3(), decode(), blender::colorspace::rec709_to_scene_linear, blender::colorspace::scene_linear_is_rec709, and blender::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(), decode(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::io::ply::load_custom_attributes(), blender::rle_encode_decode_test(), blender::ed::geometry::rna_property_for_attribute_type_set_value(), blender::tests::TEST(), blender::toFloat(), and blender::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, blender::copy_v3_v3(), encode(), blender::linearrgb_to_srgb_uchar4(), blender::colorspace::scene_linear_is_rec709, and blender::colorspace::scene_linear_to_rec709.
Referenced by blender::bke::bool_to_byte_color(), blender::bke::color_to_byte_color(), encode(), 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(), blender::fromFloat(), blender::bke::int2_to_byte_color(), blender::bke::int3_to_byte_color(), blender::bke::int8_to_byte_color(), blender::bke::int_to_byte_color(), blender::rle_encode_decode_test(), blender::ed::geometry::rna_property_for_attribute_type_retrieve_value(), blender::bke::short2_to_byte_color(), blender::tests::TEST(), and blender::transform_active_color_data().
|
inlinestatic |
Definition at line 106 of file BLI_color_mix.hh.
References get_luminance(), blender::IMB_colormanagement_get_luminance_byte(), and blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r.
|
inlinestatic |
Definition at line 101 of file BLI_color_mix.hh.
References get_luminance(), blender::IMB_colormanagement_get_luminance(), and blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r.
Referenced by get_luminance(), get_luminance(), mix_darken(), and mix_lighten().
|
static |
Definition at line 162 of file BLI_color_mix.hh.
References mix_add().
Referenced by BLI_mix_colors(), and mix_add().
|
static |
Definition at line 714 of file BLI_color_mix.hh.
References mix_alpha_add().
Referenced by BLI_mix_colors(), and mix_alpha_add().
|
static |
Definition at line 737 of file BLI_color_mix.hh.
References mix_alpha_sub().
Referenced by BLI_mix_colors(), and mix_alpha_sub().
|
static |
Definition at line 118 of file BLI_color_mix.hh.
References mix_blend(), and sqrtf.
Referenced by BLI_mix_colors(), and mix_blend().
|
static |
Definition at line 886 of file BLI_color_mix.hh.
References b, blender::hsv_to_rgb(), mix_color(), blender::rgb_to_hsv(), and blender::v2.
Referenced by BLI_mix_colors(), and mix_color().
|
static |
Definition at line 936 of file BLI_color_mix.hh.
References mix_colorburn().
Referenced by BLI_mix_colors(), and mix_colorburn().
|
static |
Definition at line 324 of file BLI_color_mix.hh.
References mix_colordodge().
Referenced by BLI_mix_colors(), and mix_colordodge().
|
static |
Definition at line 288 of file BLI_color_mix.hh.
References get_luminance(), and mix_darken().
Referenced by BLI_mix_colors(), and mix_darken().
|
static |
Definition at line 365 of file BLI_color_mix.hh.
References abs, and mix_difference().
Referenced by BLI_mix_colors(), and mix_difference().
|
static |
Definition at line 541 of file BLI_color_mix.hh.
References mix_exclusion().
Referenced by BLI_mix_colors(), and mix_exclusion().
|
static |
Definition at line 435 of file BLI_color_mix.hh.
References mix_hardlight().
Referenced by BLI_mix_colors(), and mix_hardlight().
|
static |
Definition at line 667 of file BLI_color_mix.hh.
References b, blender::hsv_to_rgb(), mix_hue(), blender::rgb_to_hsv(), and blender::v2.
Referenced by BLI_mix_colors(), and mix_hue().
|
static |
Definition at line 251 of file BLI_color_mix.hh.
References get_luminance(), and mix_lighten().
Referenced by BLI_mix_colors(), and mix_lighten().
|
static |
Definition at line 971 of file BLI_color_mix.hh.
References mix_linearburn().
Referenced by BLI_mix_colors(), and mix_linearburn().
|
static |
Definition at line 799 of file BLI_color_mix.hh.
References mix_linearlight().
Referenced by BLI_mix_colors(), and mix_linearlight().
|
static |
Definition at line 572 of file BLI_color_mix.hh.
References b, blender::hsv_to_rgb(), mix_luminosity(), blender::rgb_to_hsv(), and blender::v2.
Referenced by BLI_mix_colors(), and mix_luminosity().
|
static |
Definition at line 218 of file BLI_color_mix.hh.
References mix_mul().
Referenced by BLI_mix_colors(), and mix_mul().
|
static |
Definition at line 470 of file BLI_color_mix.hh.
References mix_overlay().
Referenced by BLI_mix_colors(), and mix_overlay().
|
static |
Definition at line 760 of file BLI_color_mix.hh.
References mix_pinlight().
Referenced by BLI_mix_colors(), and mix_pinlight().
|
static |
Definition at line 619 of file BLI_color_mix.hh.
References b, EPS_SATURATION, blender::hsv_to_rgb(), mix_saturation(), blender::rgb_to_hsv(), and blender::v2.
Referenced by BLI_mix_colors(), and mix_saturation().
|
static |
Definition at line 396 of file BLI_color_mix.hh.
References mix_screen().
Referenced by BLI_mix_colors(), and mix_screen().
|
static |
Definition at line 505 of file BLI_color_mix.hh.
References mix_softlight().
Referenced by BLI_mix_colors(), and mix_softlight().
|
static |
Definition at line 192 of file BLI_color_mix.hh.
References mix_sub().
Referenced by BLI_mix_colors(), and mix_sub().
|
static |
Definition at line 839 of file BLI_color_mix.hh.
References mix_vividlight().
Referenced by BLI_mix_colors(), and mix_vividlight().
| 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 lexit::Alpha, premultiply_alpha(), blender::Straight, and blender::straight_to_premul_v4_v4().
Referenced by blender::IMB_float_from_byte_ex(), blender::imb_working_space_convert(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), premultiply_alpha(), 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, and to_byte().
| 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, blender::rgba_float_to_uchar(), and to_byte().
Referenced by blender::tests::TEST(), to_byte(), and to_byte().
| 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, blender::rgba_uchar_to_float(), and to_float().
Referenced by blender::idp_from_PySequence_Fast(), blender::ui::markdown_draw_colors_init(), blender::tests::TEST(), to_float(), and to_float().
| BLI_INLINE ColorTheme4f blender::color::to_float | ( | const ColorTheme4f & | theme4f | ) |
Definition at line 71 of file BLI_color.hh.
References BLI_INLINE, and to_float().
| 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, blender::srgb_to_linearrgb_uchar4(), and to_scene_linear().
| 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, blender::srgb_to_linearrgb_v4(), and to_scene_linear().
Referenced by blender::ocio::create_untonemapped_ocio_display_transform(), blender::tests::TEST(), to_scene_linear(), to_scene_linear(), and blender::ocio::to_scene_linear_matrix().
| 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, blender::linearrgb_to_srgb_uchar4(), and to_theme4b().
Referenced by blender::tests::TEST(), blender::tests::TEST(), and to_theme4b().
| 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, blender::linearrgb_to_srgb_v4(), and to_theme4f().
Referenced by blender::tests::TEST(), blender::tests::TEST(), and to_theme4f().
| 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 lexit::Alpha, blender::premul_to_straight_v4_v4(), blender::Premultiplied, and unpremultiply_alpha().
Referenced by blender::imb_working_space_convert(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and unpremultiply_alpha().