[Bf-blender-cvs] [482f3c008be] master: Cleanup: use existing helper for float to uchar color conversion

James Fulop noreply at git.blender.org
Mon Jan 20 14:54:04 CET 2020


Commit: 482f3c008be1ef7efe6d52fd3957a3f755bca170
Author: James Fulop
Date:   Mon Jan 20 14:51:48 2020 +0100
Branches: master
https://developer.blender.org/rB482f3c008be1ef7efe6d52fd3957a3f755bca170

Cleanup: use existing helper for float to uchar color conversion

Differential Revision: https://developer.blender.org/D6617

===================================================================

M	source/blender/blenfont/intern/blf.c

===================================================================

diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index 10bb1bd3c9c..2b592c9e550 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -935,10 +935,7 @@ void blf_draw_buffer__start(FontBLF *font)
 {
   FontBufInfoBLF *buf_info = &font->buf_info;
 
-  buf_info->col_char[0] = buf_info->col_init[0] * 255;
-  buf_info->col_char[1] = buf_info->col_init[1] * 255;
-  buf_info->col_char[2] = buf_info->col_init[2] * 255;
-  buf_info->col_char[3] = buf_info->col_init[3] * 255;
+  rgba_float_to_uchar(buf_info->col_char, buf_info->col_init);
 
   if (buf_info->display) {
     copy_v4_v4(buf_info->col_float, buf_info->col_init);



More information about the Bf-blender-cvs mailing list