evas: use the correct method to multiply color.

This commit is contained in:
Cedric BAIL 2015-04-03 16:33:03 +02:00
parent 472f3a72ff
commit 084fb9f87e
1 changed files with 3 additions and 13 deletions

View File

@ -3530,7 +3530,7 @@ eng_ector_renderer_draw(void *data EINA_UNUSED, void *context, void *surface, Ec
Eina_Rectangle *r;
Eina_Rectangle clip;
Eina_Array_Iterator it;
unsigned int i, col;
unsigned int i;
if (dc->clip.use)
{
@ -3571,21 +3571,11 @@ eng_ector_renderer_draw(void *data EINA_UNUSED, void *context, void *surface, Ec
if (eina_array_count(c) == 0)
eina_array_push(c, eina_rectangle_new(clip.x, clip.y, clip.w, clip.h));
{
unsigned int mul_col = dc->mul.use ? dc->mul.col : 0xffffffff;
int r, g, b, a;
r = (R_VAL(&mul_col) * R_VAL(&dc->col.col)) >> 8;
g = (G_VAL(&mul_col) * G_VAL(&dc->col.col)) >> 8;
b = (B_VAL(&mul_col) * B_VAL(&dc->col.col)) >> 8;
a = (A_VAL(&mul_col) * A_VAL(&dc->col.col)) >> 8;
col = ARGB_JOIN(r, g, b, a);
}
ector.r = eo_ref(renderer);
ector.clips = c;
ector.render_op = _evas_render_op_to_ector_rop(dc->render_op);
ector.mul_col = col;
ector.mul_col = ector_color_multiply(dc->mul.use ? dc->mul.col : 0xffffffff,
dc->col.col);;
ector.x = x;
ector.y = y;
ector.free_it = EINA_FALSE;