diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2016-04-28 18:33:19 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2016-04-28 18:33:19 +0300 |
commit | 1f723603c882e6d79ab69bea6e5c034ae21a6ce7 (patch) | |
tree | 098b0133beea06c460c3e9e92010bc669d151e5d /source/blender/blenfont/intern | |
parent | 3632c4997f5019d2a519996d9e216d474aa05d3b (diff) | |
parent | a48d7407986d04492107a2ef16d0ff6f0d012c45 (diff) |
Merge branch 'master' into temp_remove_particlestemp_remove_particles
Diffstat (limited to 'source/blender/blenfont/intern')
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 11 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 977fa771014..132a0ec3808 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -849,16 +849,13 @@ void BLF_wordwrap(int fontid, int wrap_width) } } -void BLF_shadow(int fontid, int level, float r, float g, float b, float a) +void BLF_shadow(int fontid, int level, const float rgba[4]) { FontBLF *font = blf_get(fontid); if (font) { font->shadow = level; - font->shadow_col[0] = r; - font->shadow_col[1] = g; - font->shadow_col[2] = b; - font->shadow_col[3] = a; + copy_v4_v4(font->shadow_col, rgba); } } @@ -886,12 +883,12 @@ void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int } } -void BLF_buffer_col(int fontid, float r, float g, float b, float a) +void BLF_buffer_col(int fontid, const float rgba[4]) { FontBLF *font = blf_get(fontid); if (font) { - ARRAY_SET_ITEMS(font->buf_info.col_init, r, g, b, a); + copy_v4_v4(font->buf_info.col_init, rgba); } } diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 7c6bef57aa4..dfebaecb96e 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -411,7 +411,7 @@ static void blf_font_draw_buffer_ex( cbuf[0] = (unsigned char)((b_col_char[0] * a) + (cbuf[0] * (1.0f - a))); cbuf[1] = (unsigned char)((b_col_char[1] * a) + (cbuf[1] * (1.0f - a))); cbuf[2] = (unsigned char)((b_col_char[2] * a) + (cbuf[2] * (1.0f - a))); - cbuf[3] = (unsigned char)((alphatest = ((int)cbuf[3] + (int)(a * 255)) < 255) ? + cbuf[3] = (unsigned char)(((alphatest = ((int)cbuf[3] + (int)(a * 255))) < 255) ? alphatest : 255); } } |