diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-11-14 08:10:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-11-14 08:10:48 +0300 |
commit | 40ad1cf0b1203848508cf6389e4337eb5071edf6 (patch) | |
tree | bd46e49b9e8f9b25b414828cd1de540ddea177e7 /source/blender/blenlib/BLI_math_color.h | |
parent | 212a8d9e5ae78a30ed4c35161d91eeca35eaa41f (diff) |
BLI: sync changes from 2.8
Diffstat (limited to 'source/blender/blenlib/BLI_math_color.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_color.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index 5e6b1256d30..34fc52c12c0 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -141,7 +141,11 @@ MINLINE void float_to_byte_dither_v3(unsigned char b[3], const float f[3], float #define rgba_char_args_set_fl(col, r, g, b, a) \ rgba_char_args_set(col, (r) * 255, (g) * 255, (b) * 255, (a) * 255) +#define rgba_float_args_set_ch(col, r, g, b, a) \ + rgba_float_args_set(col, (r) / 255.0f, (g) / 255.0f, (b) / 255.0f, (a) / 255.0f) + MINLINE void rgba_char_args_set(char col[4], const char r, const char g, const char b, const char a); +MINLINE void rgba_float_args_set(float col[4], const float r, const float g, const float b, const float a); MINLINE void rgba_char_args_test_set(char col[4], const char r, const char g, const char b, const char a); MINLINE void cpack_cpy_3ub(unsigned char r_col[3], const unsigned int pack); |