From 482f3c008be1ef7efe6d52fd3957a3f755bca170 Mon Sep 17 00:00:00 2001 From: James Fulop Date: Mon, 20 Jan 2020 14:51:48 +0100 Subject: Cleanup: use existing helper for float to uchar color conversion Differential Revision: https://developer.blender.org/D6617 --- source/blender/blenfont/intern/blf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/blender/blenfont') 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); -- cgit v1.2.3