jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6980cb2c709ff69133f24549fd9f44fe42993ed4

commit 6980cb2c709ff69133f24549fd9f44fe42993ed4
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Tue Jun 30 10:33:29 2015 +0900

    Evas filters: Fix color(0xrrggbb) to be opaque by default
    
    For compatibility with previous behaviour and with what the doc
    says, make sure default alpha is 255 and not 0.
    
    This way color(0) is black and not transparent
---
 src/lib/evas/filters/lua/color.lua | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/lua/color.lua 
b/src/lib/evas/filters/lua/color.lua
index 3fb1e9b..fc60d8e 100644
--- a/src/lib/evas/filters/lua/color.lua
+++ b/src/lib/evas/filters/lua/color.lua
@@ -147,7 +147,7 @@ __color = {
 
          -- input single value 0xAARRGGBB
          if ((B == nil) and (type(A) == 'number')) then
-            A = math.floor(A) -- % 0x100000000
+            A = math.floor(A)
             if ((A < 0) or (A > 0xFFFFFFFF)) then
                error('Invalid color value: ' .. string.format("0x%x", A))
             end
@@ -155,6 +155,7 @@ __color = {
             self.r = math.floor((A / 0x10000) % 0x100)
             self.g = math.floor((A / 0x100) % 0x100)
             self.b = math.floor(A % 0x100)
+            if (self.a == 0) then self.a = 255 end
             return self
          end
 

-- 


Reply via email to