since too many people make this mistake of not reading evas's docs and
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 23 Feb 2012 04:53:19 +0000 (04:53 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 23 Feb 2012 04:53:19 +0000 (04:53 +0000)
seeing color is PREMULTIPLIED ARGB... evas_object_color_set is just
going to enforce it and limit r, g and b to a.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@68299 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_main.c

index 9543228..567c191 100644 (file)
@@ -1041,6 +1041,10 @@ evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
    if (g > 255) g = 255; if (g < 0) g = 0;
    if (b > 255) b = 255; if (b < 0) b = 0;
    if (a > 255) a = 255; if (a < 0) a = 0;
+   if (r > a) r = a;
+   if (g > a) g = a;
+   if (b > a) b = a;
+
    if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return;
    if (obj->smart.smart)
      {