Sha256: 3559e482864883a99a170f7be6d54ddc8ef2fadd1fde5d7268fe8d07f699dd22

Contents?: true

Size: 606 Bytes

Versions: 30

Compression:

Stored size: 606 Bytes

Contents

#! /usr/local/bin/ruby -w
require 'RMagick'

# Demonstrate the annotate method

Text = 'RMagick'

granite = Magick::ImageList.new('granite:')
canvas = Magick::ImageList.new
canvas.new_image(300, 100, Magick::TextureFill.new(granite))

text = Magick::Draw.new
text.font_family = 'helvetica'
text.pointsize = 52
text.gravity = Magick::CenterGravity

text.annotate(canvas, 0,0,2,2, Text) {
    self.fill = 'gray83'
}

text.annotate(canvas, 0,0,-1.5,-1.5, Text) {
    self.fill = 'gray40'
}

text.annotate(canvas, 0,0,0,0, Text) {
    self.fill = 'darkred'
}

#canvas.display
canvas.write('rubyname.gif')
exit

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rmagick-1.10.0 doc/ex/rubyname.rb
rmagick-1.10.1 doc/ex/rubyname.rb
rmagick-1.11.0 doc/ex/rubyname.rb
rmagick-1.11.1 doc/ex/rubyname.rb
rmagick-1.12.0 doc/ex/rubyname.rb
rmagick-1.13.0 doc/ex/rubyname.rb
rmagick-1.15.1 doc/ex/rubyname.rb
rmagick-1.15.0 doc/ex/rubyname.rb
rmagick-1.14.0 doc/ex/rubyname.rb
rmagick-1.14.1 doc/ex/rubyname.rb
rmagick-1.15.2 doc/ex/rubyname.rb
rmagick-1.15.4 doc/ex/rubyname.rb
rmagick-1.15.3 doc/ex/rubyname.rb
rmagick-1.15.6 doc/ex/rubyname.rb
rmagick-1.15.5 doc/ex/rubyname.rb
rmagick-1.15.8 doc/ex/rubyname.rb
rmagick-1.15.7 doc/ex/rubyname.rb
rmagick-1.7.1 doc/ex/rubyname.rb
rmagick-1.15.9 doc/ex/rubyname.rb
rmagick-1.7.2 doc/ex/rubyname.rb