From d350177475eee9c19ad41036fe3a9f21a938b1e7 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 16 Mar 2012 15:02:01 +0000 Subject: [PATCH] evas: print error instead of only silently preventing bad things to happen. SVN revision: 69460 --- legacy/evas/src/lib/canvas/evas_object_main.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_main.c b/legacy/evas/src/lib/canvas/evas_object_main.c index 567c1916ee..81fc85878d 100644 --- a/legacy/evas/src/lib/canvas/evas_object_main.c +++ b/legacy/evas/src/lib/canvas/evas_object_main.c @@ -1041,9 +1041,21 @@ 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 (r > a) + { + r = a; + ERR("Evas only handle pre multiplied color !"); + } + if (g > a) + { + g = a; + ERR("Evas only handle pre multiplied color !"); + } + if (b > a) + { + b = a; + ERR("Evas only handle pre multiplied color !"); + } if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return; if (obj->smart.smart)