Sha256: c224f993dc99cacf6b01a75c5bfb5a4aebfe6a064d3334914b4df57528693140
Contents?: true
Size: 933 Bytes
Versions: 4
Compression:
Stored size: 933 Bytes
Contents
#! /usr/local/bin/ruby -w require 'RMagick' # Demonstrate the Image#texture_fill_to_border method # This example is nearly identical to the color_fill_to_border example. before = Magick::Image.new(200,200) { self.background_color = 'white' self.border_color = 'black' } 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.compression = Magick::LZWCompression before.write('texture_fill_to_border_before.gif') # Use the builtin 'rose' image as the texture fill. rose = Magick::Image.read('rose:').first after = before.texture_fill_to_border(100,100, rose) after.write('texture_fill_to_border_after.gif') exit
Version data entries
4 entries across 4 versions & 1 rubygems