projects
/
embrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated for premul alpha changes in Evas.
[embrace.git]
/
bin
/
embrace
diff --git
a/bin/embrace
b/bin/embrace
index f7ae62b0cf9ac72c17113b558c37a80e033e568d..1d28c908d65f5b274d92dfc4068b3529332ba85e 100755
(executable)
--- 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
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
end
module Embrace
@@
-81,10
+77,10
@@
module Embrace
# an animator that runs for the specified number of seconds,
# and yields values between 0 and 255
class AlphaAnimator < ZeroToOneAnimator
# an animator that runs for the specified number of seconds,
# and yields values between 0 and 255
class AlphaAnimator < ZeroToOneAnimator
- def initialize(duration,
*objects
)
+ def initialize(duration,
object
)
super(duration) do |v|
a = compute_alpha(v)
super(duration) do |v|
a = compute_alpha(v)
- object
s.each { |o| o.alpha = a }
+ object
.set_color(a, a, a, a)
end
end
end
end
@@
-142,9
+138,7
@@
module Embrace
@objects = [@img, @label]
@objects.each { |o| add_member(o) }
@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)
@img.set_file(ICON_FILE)
@img.set_fill(0, 0, *@img.get_size)
@@
-202,7
+196,8
@@
module Embrace
end
def smart_color_set(r, g, b, a)
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
end
end