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/blenkernel/intern/image_gen.c | |
parent | a9729e6d75c74f48c6135df710f117435e7ff2f3 (diff) |
BLF: use float vector passing color args
Diffstat (limited to 'source/blender/blenkernel/intern/image_gen.c')
-rw-r--r-- | source/blender/blenkernel/intern/image_gen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index 303d0c6adfc..10e7d46b315 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -297,6 +297,9 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width */ BLF_buffer(mono, rect_float, rect, width, height, 4, NULL); + const float text_color[4] = {0.0, 0.0, 0.0, 1.0}; + const float text_outline[4] = {1.0, 1.0, 1.0, 1.0}; + for (y = 0; y < height; y += step) { text[1] = '1'; @@ -306,7 +309,7 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width pen_y = y + 44; /* terribly crappy outline font! */ - BLF_buffer_col(mono, 1.0, 1.0, 1.0, 1.0); + BLF_buffer_col(mono, text_outline); BLF_position(mono, pen_x - outline, pen_y, 0.0); BLF_draw_buffer(mono, text, 2); @@ -326,7 +329,7 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width BLF_position(mono, pen_x + outline, pen_y - outline, 0.0); BLF_draw_buffer(mono, text, 2); - BLF_buffer_col(mono, 0.0, 0.0, 0.0, 1.0); + BLF_buffer_col(mono, text_color); BLF_position(mono, pen_x, pen_y, 0.0); BLF_draw_buffer(mono, text, 2); |