Sha256: 352f8335e31c41c67b28bf1267de5791f14fc0c164a2e32034e9680cdffb3521

Contents?: true

Size: 864 Bytes

Versions: 63

Compression:

Stored size: 864 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')

hat = Magick::Image.read('images/Flower_Hat.jpg').first
hat.resize!(0.3)
before.fuzz = 25
after = before.texture_floodfill(100,100, hat)

after.write('texture_floodfill_after.gif')
exit

Version data entries

63 entries across 63 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/texture_floodfill.rb
rmagick-2.13.3 doc/ex/texture_floodfill.rb
rmagick-2.13.3.rc1 doc/ex/texture_floodfill.rb
rmagick-2.13.2 doc/ex/texture_floodfill.rb
rdp-rmagick-0.0.0 doc/ex/texture_floodfill.rb
rmagick-2.13.1 doc/ex/texture_floodfill.rb
rmagick-2.12.2 doc/ex/texture_floodfill.rb
rmagick-2.12.1 doc/ex/texture_floodfill.rb
rmagick-2.12.0 doc/ex/texture_floodfill.rb
rmagick-2.11.1 doc/ex/texture_floodfill.rb
rmagick-2.10.0 doc/ex/texture_floodfill.rb
rmagick-2.11.0 doc/ex/texture_floodfill.rb
rmagick-1.10.0 doc/ex/texture_floodfill.rb
rmagick-1.10.1 doc/ex/texture_floodfill.rb
rmagick-1.11.0 doc/ex/texture_floodfill.rb
rmagick-1.13.0 doc/ex/texture_floodfill.rb
rmagick-1.12.0 doc/ex/texture_floodfill.rb
rmagick-1.11.1 doc/ex/texture_floodfill.rb
rmagick-1.15.10 doc/ex/texture_floodfill.rb
rmagick-1.15.1 doc/ex/texture_floodfill.rb