diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-04-22 13:02:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-22 13:02:41 +0300 |
commit | c12e1a09ec7e76455d81fe4114e91a1561cbdb6d (patch) | |
tree | cb6fb333f48f0e04a102cccd558377e649409db8 /source/blender/editors | |
parent | a9729e6d75c74f48c6135df710f117435e7ff2f3 (diff) |
BLF: use float vector passing color args
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 2fdd84b626b..62b373c58c8 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1679,7 +1679,7 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active) BLF_size(fontid, fstyle_points, U.dpi); BLF_enable(fontid, BLF_SHADOW); - BLF_shadow(fontid, 3, 1.0f, 1.0f, 1.0f, 0.25f); + BLF_shadow(fontid, 3, (const float[4]){1.0f, 1.0f, 1.0f, 0.25f}); BLF_shadow_offset(fontid, -1, -1); BLI_assert(UI_panel_category_is_visible(ar)); diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index bfde02dbefd..423c48e5f55 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -160,7 +160,8 @@ void UI_fontstyle_draw_ex( /* set the flag */ if (fs->shadow) { font_flag |= BLF_SHADOW; - BLF_shadow(fs->uifont_id, fs->shadow, fs->shadowcolor, fs->shadowcolor, fs->shadowcolor, fs->shadowalpha); + const float shadow_color[4] = {fs->shadowcolor, fs->shadowcolor, fs->shadowcolor, fs->shadowalpha}; + BLF_shadow(fs->uifont_id, fs->shadow, shadow_color); BLF_shadow_offset(fs->uifont_id, fs->shadx, fs->shady); } if (fs->kerning == 1) { @@ -251,7 +252,8 @@ void UI_fontstyle_draw_rotated(const uiFontStyle *fs, const rcti *rect, const ch if (fs->shadow) { BLF_enable(fs->uifont_id, BLF_SHADOW); - BLF_shadow(fs->uifont_id, fs->shadow, fs->shadowcolor, fs->shadowcolor, fs->shadowcolor, fs->shadowalpha); + const float shadow_color[4] = {fs->shadowcolor, fs->shadowcolor, fs->shadowcolor, fs->shadowalpha}; + BLF_shadow(fs->uifont_id, fs->shadow, shadow_color); BLF_shadow_offset(fs->uifont_id, fs->shadx, fs->shady); } |