lib/rubysketch/processing.rb in rubysketch-0.1.4 vs lib/rubysketch/processing.rb in rubysketch-0.1.5
- old
+ new
@@ -603,14 +603,12 @@
def background (*args)
rgba = to_rgba__ *args
if rgba[3] == 1
@painter__.background *rgba
else
- f = @painter__.fill *rgba
- s = @painter__.stroke nil
- @painter__.rect 0, 0, width, height
- @painter__.fill f
- @painter__.stroke s
+ @painter__.push fill: rgba, stroke: nil do |_|
+ @painter__.rect 0, 0, width, height
+ end
end
nil
end
# Sets fill color.