jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=64baafe1760006eafc7d40a9546ecb4a29450163

commit 64baafe1760006eafc7d40a9546ecb4a29450163
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Wed Apr 30 13:38:38 2014 +0900

    Evas filters: Premultiply colors after parsing integers
---
 src/lib/evas/filters/evas_filter_parser.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 4f2c000..ca99a63 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1617,7 +1617,16 @@ _lua_parameter_parse(lua_State *L, Instruction_Param 
*param, int i)
         break;
       case VT_COLOR:
         if (lua_isnumber(L, i))
-          eina_value_set(param->value, (DATA32) lua_tonumber(L, i));
+          {
+             DATA32 color = (DATA32) lua_tonumber(L, i);
+             int A = A_VAL(&color);
+             int R = R_VAL(&color);
+             int G = G_VAL(&color);
+             int B = B_VAL(&color);
+             if (!A && (R || B || G)) A = 0xFF;
+             evas_color_argb_premul(A, &R, &G, &B);
+             eina_value_set(param->value, ARGB_JOIN(A, R, G, B));
+          }
         else if (lua_type(L, i) == LUA_TSTRING)
           {
              DATA32 color;

-- 


Reply via email to