Skip to content

Commit

Permalink
solid fill class
Browse files Browse the repository at this point in the history
  • Loading branch information
VorontsovIE committed Jun 5, 2014
1 parent 79e1708 commit 51d1555
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/RMagick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1958,5 +1958,17 @@ def fill(img) # required
end
end

# Fill class with solid monochromatic color
class SolidFill
def initialize(bgcolor)
@bgcolor = bgcolor
end

def fill(img)
img.background_color = @bgcolor
img.erase!
end
end

end # Magick

0 comments on commit 51d1555

Please sign in to comment.