Blender  V3.3
Functions
BLI_math_color_blend.h File Reference
#include "BLI_math_inline.h"
#include "intern/math_color_blend_inline.c"

Go to the source code of this file.

Functions

MINLINE void blend_color_mix_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
 
MINLINE void blend_color_add_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
 
MINLINE void blend_color_sub_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
 
MINLINE void blend_color_mul_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
 
MINLINE void blend_color_lighten_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
 
MINLINE void blend_color_darken_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
 
MINLINE void blend_color_erase_alpha_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
 
MINLINE void blend_color_add_alpha_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
 
MINLINE void blend_color_overlay_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_hardlight_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_burn_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_linearburn_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_dodge_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_screen_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_softlight_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_pinlight_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_linearlight_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_vividlight_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_difference_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_exclusion_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_color_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_hue_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_saturation_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_luminosity_byte (unsigned char dst[4], const uchar src1[4], const uchar src2[4])
 
MINLINE void blend_color_interpolate_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4], float t)
 
MINLINE void blend_color_mix_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_add_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_sub_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_mul_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_lighten_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_darken_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_erase_alpha_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_add_alpha_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_overlay_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_hardlight_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_burn_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_linearburn_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_dodge_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_screen_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_softlight_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_pinlight_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_linearlight_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_vividlight_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_difference_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_exclusion_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_color_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_hue_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_saturation_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_luminosity_float (float dst[4], const float src1[4], const float src2[4])
 
MINLINE void blend_color_interpolate_float (float dst[4], const float src1[4], const float src2[4], float t)
 

Function Documentation

◆ blend_color_add_alpha_byte()

MINLINE void blend_color_add_alpha_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4] 
)

Definition at line 187 of file math_color_blend_inline.c.

References copy_v4_v4_uchar(), divide_round_i(), min_ii(), and t.

Referenced by IMB_blend_color_byte(), and IMB_rectblend().

◆ blend_color_add_alpha_float()

MINLINE void blend_color_add_alpha_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 726 of file math_color_blend_inline.c.

References copy_v4_v4(), EPS_ALPHA, and min_ff().

Referenced by IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_add_byte()

MINLINE void blend_color_add_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4] 
)

◆ blend_color_add_float()

MINLINE void blend_color_add_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_burn_byte()

MINLINE void blend_color_burn_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_burn_float()

MINLINE void blend_color_burn_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 800 of file math_color_blend_inline.c.

References copy_v4_v4(), and max_ff().

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_color_byte()

MINLINE void blend_color_color_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_color_float()

MINLINE void blend_color_color_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_darken_byte()

MINLINE void blend_color_darken_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4] 
)

◆ blend_color_darken_float()

MINLINE void blend_color_darken_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 682 of file math_color_blend_inline.c.

References copy_v4_v4(), min_ff(), and t.

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_difference_byte()

MINLINE void blend_color_difference_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_difference_float()

MINLINE void blend_color_difference_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 973 of file math_color_blend_inline.c.

References copy_v4_v4(), and fabsf.

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_dodge_byte()

MINLINE void blend_color_dodge_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_dodge_float()

MINLINE void blend_color_dodge_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 837 of file math_color_blend_inline.c.

References copy_v4_v4(), and min_ff().

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_erase_alpha_byte()

MINLINE void blend_color_erase_alpha_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4] 
)

Definition at line 170 of file math_color_blend_inline.c.

References copy_v4_v4_uchar(), divide_round_i(), max_ii(), and t.

Referenced by IMB_blend_color_byte(), and IMB_rectblend().

◆ blend_color_erase_alpha_float()

MINLINE void blend_color_erase_alpha_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 702 of file math_color_blend_inline.c.

References copy_v4_v4(), EPS_ALPHA, and max_ff().

Referenced by IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_exclusion_byte()

MINLINE void blend_color_exclusion_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_exclusion_float()

MINLINE void blend_color_exclusion_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 990 of file math_color_blend_inline.c.

References copy_v4_v4().

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_hardlight_byte()

MINLINE void blend_color_hardlight_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_hardlight_float()

MINLINE void blend_color_hardlight_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 775 of file math_color_blend_inline.c.

References copy_v4_v4(), and min_ff().

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_hue_byte()

MINLINE void blend_color_hue_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_hue_float()

MINLINE void blend_color_hue_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_interpolate_byte()

MINLINE void blend_color_interpolate_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4],
float  t 
)

◆ blend_color_interpolate_float()

MINLINE void blend_color_interpolate_float ( float  dst[4],
const float  src1[4],
const float  src2[4],
float  t 
)

◆ blend_color_lighten_byte()

MINLINE void blend_color_lighten_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4] 
)

◆ blend_color_lighten_float()

MINLINE void blend_color_lighten_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 662 of file math_color_blend_inline.c.

References copy_v4_v4(), max_ff(), and t.

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_linearburn_byte()

MINLINE void blend_color_linearburn_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_linearburn_float()

MINLINE void blend_color_linearburn_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 819 of file math_color_blend_inline.c.

References copy_v4_v4(), and max_ff().

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_linearlight_byte()

MINLINE void blend_color_linearlight_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_linearlight_float()

MINLINE void blend_color_linearlight_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_luminosity_byte()

MINLINE void blend_color_luminosity_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_luminosity_float()

MINLINE void blend_color_luminosity_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_mix_byte()

MINLINE void blend_color_mix_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4] 
)

◆ blend_color_mix_float()

MINLINE void blend_color_mix_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_mul_byte()

MINLINE void blend_color_mul_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4] 
)

◆ blend_color_mul_float()

MINLINE void blend_color_mul_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_overlay_byte()

MINLINE void blend_color_overlay_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_overlay_float()

MINLINE void blend_color_overlay_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 750 of file math_color_blend_inline.c.

References copy_v4_v4(), and min_ff().

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_pinlight_byte()

MINLINE void blend_color_pinlight_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_pinlight_float()

MINLINE void blend_color_pinlight_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_saturation_byte()

MINLINE void blend_color_saturation_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_saturation_float()

MINLINE void blend_color_saturation_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_screen_byte()

MINLINE void blend_color_screen_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_screen_float()

MINLINE void blend_color_screen_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 855 of file math_color_blend_inline.c.

References copy_v4_v4(), and max_ff().

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_softlight_byte()

MINLINE void blend_color_softlight_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_softlight_float()

MINLINE void blend_color_softlight_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

Definition at line 873 of file math_color_blend_inline.c.

References copy_v4_v4().

Referenced by do_blend_effect_float(), IMB_blend_color_float(), and IMB_rectblend().

◆ blend_color_sub_byte()

MINLINE void blend_color_sub_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4] 
)

◆ blend_color_sub_float()

MINLINE void blend_color_sub_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)

◆ blend_color_vividlight_byte()

MINLINE void blend_color_vividlight_byte ( unsigned char  dst[4],
const uchar  src1[4],
const uchar  src2[4] 
)

◆ blend_color_vividlight_float()

MINLINE void blend_color_vividlight_float ( float  dst[4],
const float  src1[4],
const float  src2[4] 
)