Sha256: 031886f09796291d0924534c9930accbe37e3285f23cfbb3f10c947837ffa1a9
Contents?: true
Size: 833 Bytes
Versions: 4
Compression:
Stored size: 833 Bytes
Contents
#! /usr/local/bin/ruby -w require 'RMagick' # Demonstrate the Image#texture_floodfill method # This example is nearly identical to the color_floodfill example. before = Magick::Image.new(200,200) { self.background_color = 'white' } before.border!(1,1,'black') circle = Magick::Draw.new circle.fill('transparent') circle.stroke_width(2) circle.stroke('black') circle.circle(100,100,180,100) circle.fill('plum1') circle.stroke('transparent') circle.circle( 60,100, 40,100) circle.circle(140,100,120,100) circle.circle(100, 60,100, 40) circle.circle(100,140,100,120) circle.draw(before) before.compression = Magick::LZWCompression before.write('texture_floodfill_before.gif') rose = Magick::Image.read('rose:').first before.fuzz = 25 after = before.texture_floodfill(100,100, rose) after.write('texture_floodfill_after.gif') exit
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rmagick-1.7.1 | doc/ex/texture_floodfill.rb |
rmagick-1.7.2 | doc/ex/texture_floodfill.rb |
rmagick-1.7.3 | doc/ex/texture_floodfill.rb |
rmagick-1.7.4 | doc/ex/texture_floodfill.rb |