Sha256: 9877898a47954da163e01a784e7bc404aac6dfc9dbfc6d0280d6978bed43ae3a
Contents?: true
Size: 598 Bytes
Versions: 6
Compression:
Stored size: 598 Bytes
Contents
#!/usr/bin/env ruby -w require 'rmagick' # Demonstrate the HatchFill class Cols = 300 Rows = 100 Background = 'white' Foreground = 'LightCyan2' fill = Magick::HatchFill.new(Background, Foreground) img = Magick::ImageList.new img.new_image(Cols, Rows, fill) # Annotate the filled image with the code that created the fill. ann = Magick::Draw.new ann.annotate(img, 0, 0, 0, 0, "HatchFill.new('#{Background}', '#{Foreground}')") do self.gravity = Magick::CenterGravity self.fill = 'black' self.stroke = 'transparent' self.pointsize = 14 end # img.display img.write('hatchfill.gif') exit
Version data entries
6 entries across 6 versions & 1 rubygems