projects
/
embrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0f8a9c0
)
Updated for premul alpha changes in Evas.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 1 Oct 2006 19:21:03 +0000
(21:21 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 1 Oct 2006 19:21:03 +0000
(21:21 +0200)
bin/embrace
patch
|
blob
|
history
diff --git
a/bin/embrace
b/bin/embrace
index fa6f5534fe6abdd438800d5661409b70950844fa..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
@@
-83,7
+79,8
@@
module Embrace
class AlphaAnimator < ZeroToOneAnimator
def initialize(duration, object)
super(duration) do |v|
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
end
end
@@
-141,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)
@@
-201,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