lib/rabbit/element/image.rb in rabbit-0.6.3 vs lib/rabbit/element/image.rb in rabbit-0.6.4

- old
+ new

@@ -110,17 +110,21 @@ end private def setup_draw_parameters(prop) @draw_parameters = {} + @draw_parameters[:reflect] = {} if true_value?(prop["reflect"]) [:ratio, :alpha].each do |key| name = "reflect_#{key}" value = prop[name] next unless value @draw_parameters[:reflect] ||= {} @draw_parameters[:reflect][key] = Float(value) end + + alpha = prop["alpha"] + @draw_parameters[:alpha] = Float(alpha) if alpha end def draw_image(canvas, x, y, w, h, simulation) unless simulation image_draw(canvas, x, y, @draw_parameters)