lib/image_voodoo/awt/shapes.rb in image_voodoo-0.8.4 vs lib/image_voodoo/awt/shapes.rb in image_voodoo-0.8.5
- old
+ new
@@ -4,11 +4,11 @@
# *AWT* Draw a square
#
def square(x, y, dim, rgb, fill=true)
square_rounded(x, y, dim, rgb, 0, fill)
end
-
+
##
# *AWT* Draw a rectangle
#
def rect(x, y, width, height, rgb, fill=true)
rect_rounded(x, y, width, height, rgb, 0, 0, fill)
@@ -33,10 +33,10 @@
end
end
end
def as_color(color)
- paint do |g|
+ paint do |g|
old_color = g.color
g.color = color
yield g
g.color = old_color
end