Sha256: 6057afbeb43d1d2ee940e0b057dfed1ef8df80bb17c227e55e609b290b7416cc

Contents?: true

Size: 715 Bytes

Versions: 13

Compression:

Stored size: 715 Bytes

Contents

#!/usr/bin/env ruby -w
require 'rmagick'

# Demonstrate the Image#color_fill_to_border method

before = Magick::Image.new(200,200) do
  self.background_color = 'white'
  self.border_color = 'black'
end
before.border!(1,1,'black')

circle = Magick::Draw.new
circle.fill('transparent')
circle.stroke('black')
circle.stroke_width(2)
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.write('color_fill_to_border_before.gif')

after = before.color_fill_to_border(100,100, 'aquamarine')
after.write('color_fill_to_border_after.gif')
exit

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
rmagick-windows-2.16.5 doc/ex/color_fill_to_border.rb
rmagick-windows-2.16.4 doc/ex/color_fill_to_border.rb
rmagick-windows-2.16.3 doc/ex/color_fill_to_border.rb
rmagick-windows-2.16.2 doc/ex/color_fill_to_border.rb
rmagick-windows-2.16.1 doc/ex/color_fill_to_border.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/doc/ex/color_fill_to_border.rb
rmagick-2.16.0 doc/ex/color_fill_to_border.rb
rmagick-2.15.4 doc/ex/color_fill_to_border.rb
rmagick-2.15.3 doc/ex/color_fill_to_border.rb
rmagick-2.15.2 doc/ex/color_fill_to_border.rb
rmagick-2.15.1 doc/ex/color_fill_to_border.rb
rmagick-2.15.0 doc/ex/color_fill_to_border.rb
rmagick-2.14.0 doc/ex/color_fill_to_border.rb