lib/image_voodoo/awt/shapes.rb in image_voodoo-0.9.0 vs lib/image_voodoo/awt/shapes.rb in image_voodoo-0.9.1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + class ImageVoodoo # (Experimental) An attempt at some primitive drawing in images. module Shapes # FIXME: if image has alpha values the border shows through since it is # a solid fill. @@ -12,10 +14,10 @@ # def add_border(options = {}) border_width = options[:width].to_i || 2 new_width, new_height = width + 2*border_width, height + 2*border_width target = paint(BufferedImage.new(new_width, new_height, color_type)) do |g| - paint_border(g, new_width, new_height, options[:color]) + paint_border(g, new_width, new_height, options) g.draw_image(@src, nil, border_width, border_width) end block_given? ? yield(target) : target end