Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-07 18:31:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-07 18:51:40 +0300
commitf74d85ffc8232a859b1419f5dc25b244ae04375f (patch)
treef74928d7681488c044ea65249eaaa5b6900d246b /source/blender/imbuf/intern/rectop.c
parent905eeb0bc7f46efb95cb5450cc6c2ec27f02730c (diff)
Cleanup: rename char/float conversion functions
- FTOCHAR -> unit_float_to_uchar_clamp - F3TOCHAR3 -> unit_float_to_uchar_clamp_v3 (swap args) - F4TOCHAR4 -> unit_float_to_uchar_clamp_v4 (swap args) - FTOUSHORT -> unit_float_to_ushort_clamp - USHORTTOUCHAR -> unit_ushort_to_uchar
Diffstat (limited to 'source/blender/imbuf/intern/rectop.c')
-rw-r--r--source/blender/imbuf/intern/rectop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index c4325caac91..2fe17ee56c6 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -841,12 +841,12 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
unsigned char chr = 0, chg = 0, chb = 0;
float fr = 0, fg = 0, fb = 0;
- const int alphaint = FTOCHAR(a);
+ const int alphaint = unit_float_to_uchar_clamp(a);
if (a == 1.0f) {
- chr = FTOCHAR(col[0]);
- chg = FTOCHAR(col[1]);
- chb = FTOCHAR(col[2]);
+ chr = unit_float_to_uchar_clamp(col[0]);
+ chg = unit_float_to_uchar_clamp(col[1]);
+ chb = unit_float_to_uchar_clamp(col[2]);
}
else {
fr = col[0] * a;