Method: Magick::Image#color_reset!
- Defined in:
- lib/rmagick_internal.rb
#color_reset!(fill) ⇒ Object
Set all pixels to the fill color. Very similar to Image#erase! Accepts either String or Pixel arguments
809 810 811 812 813 814 815 816 817 818 819 820 821 |
# File 'lib/rmagick_internal.rb', line 809 def color_reset!(fill) save = background_color # Change the background color _outside_ the begin block # so that if this object is frozen the exeception will be # raised before we have to handle it explicitly. self.background_color = fill begin erase! ensure self.background_color = save end self end |