elm_colorselector_color_get(obj, &r, &g, &b, &a);
printf("Changed Color [r=%d g=%d b=%d a=%d]\n", r, g, b, a);
-
- /* Fix Alpha pre multiplication by edje */
- r = (r * a) / 255;
- g = (g * a) / 255;
- b = (b * a) / 255;
-
+ evas_color_argb_premul(&a, &r, &g, &b);
evas_object_color_set(re, r, g, b, a);
}
{
int r, g, b, a;
elm_colorselector_color_get(obj, &r, &g, &b, &a);
+ // ensure colors are pre-multiplied by alpha
+ evas_color_argb_premul(a, &r, &g, &b);
evas_object_color_set(data, r, g, b, a);
}
int r = 0, g = 0, b = 0 ,a = 0;
Elm_Object_Item *color_it = (Elm_Object_Item *) event_info;
elm_colorselector_palette_item_color_get(color_it, &r, &g, &b, &a);
+ // ensure colors are pre-multiplied by alpha
+ evas_color_argb_premul(a, &r, &g, &b);
evas_object_color_set(data, r, g, b, a);
}
_transit_color(Elm_Transit *trans)
{
/* changes the object color from 100, 255, 100, 255 to
- * 200, 50, 200, 50 */
- elm_transit_effect_color_add(trans, 100, 255, 100, 255, 200, 50, 200, 50);
+ * 40, 10, 40, 50 */
+ elm_transit_effect_color_add(trans, 100, 255, 100, 255, 40, 10, 40, 50);
}
static void