c1 | the first color. | |
c2 | the second color. |
#include <bx.h> int main (void) { bx_window win; bx_color c1, c2, c3; int w= 180, h= 60; bx_init (); win= bx_create_window ("bx_mean_color", 10 , 10, w, h); c1= bx_pink (); c3= bx_orange (); c2= bx_mean_color (c1, c3); bx_set_color (c1); bx_draw_box (win, 0*w/3, 0, w/3, h, BX_FILLED); bx_set_color (c2); bx_draw_box (win, 1*w/3, 0, w/3, h, BX_FILLED); bx_set_color (c3); bx_draw_box (win, 2*w/3, 0, w/3, h, BX_FILLED); bx_show_canvas (win, 0); bx_loop(); return 0; }