From 633df2fe37fade5c825f3829386fefff357f592e Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 1 Oct 2006 21:21:03 +0200 Subject: [PATCH] Updated for premul alpha changes in Evas. --- bin/embrace | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bin/embrace b/bin/embrace index fa6f553..1d28c90 100755 --- a/bin/embrace +++ b/bin/embrace @@ -40,10 +40,6 @@ class Evas::EvasObject move_relative(obj, (b[2] / 2) - (a[2] / 2), (b[3] / 2) - (a[3] / 2)) end - - def alpha=(alpha) - set_color(*(get_color[0..-2] << alpha)) - end end module Embrace @@ -83,7 +79,8 @@ module Embrace class AlphaAnimator < ZeroToOneAnimator def initialize(duration, object) super(duration) do |v| - object.alpha = compute_alpha(v) + a = compute_alpha(v) + object.set_color(a, a, a, a) end end @@ -141,9 +138,7 @@ module Embrace @objects = [@img, @label] @objects.each { |o| add_member(o) } - set_color(255, 255, 255, 0) - @img.set_color(255, 255, 255, 0) - @label.set_color(255, 0, 0, 0) + set_color(0, 0, 0, 0) @img.set_file(ICON_FILE) @img.set_fill(0, 0, *@img.get_size) @@ -201,7 +196,8 @@ module Embrace end def smart_color_set(r, g, b, a) - @objects.each { |o| o.alpha = a } + @img.set_color(r, g, b, a) + @label.set_color(r, 0, 0, a) end end -- 2.30.2