rmagick-temp / rmagick

An interface to the ImageMagick and GraphicsMagick image processing libraries.
http://rmagick.rubyforge.org/
MIT License
790 stars 102 forks source link

solid fill class #105

Open VorontsovIE opened 10 years ago

VorontsovIE commented 10 years ago

New class SolidFill in order to fill image with monochromatic background. It allows one to write image constructors consistenly:

Image.new(size_x, size_y, HatchFill.new('white', 'red'))
Image.new(size_x, size_y, SolidFill.new('bisque'))

syntax for both gradient/hatched and for solid backgrounds instead of two completely different syntaxes

Image.new(size_x,size_y, HatchFill.new('white','red'))
Image.new(size_x,size_y){ self.background_color = 'bisque' }