Sha256: e2d42721f1cf1f7aabc92b34ef7c6172db6aeb87cef4e9c7ec9bbd15b6b77e4f

Contents?: true

Size: 575 Bytes

Versions: 37

Compression:

Stored size: 575 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.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

37 entries across 37 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/rubyname.rb
rmagick-2.13.3 doc/ex/rubyname.rb
rmagick-2.13.3.rc1 doc/ex/rubyname.rb
rmagick-2.13.2 doc/ex/rubyname.rb
rdp-rmagick-0.0.0 doc/ex/rubyname.rb
rmagick-2.13.1 doc/ex/rubyname.rb
rmagick-2.12.2 doc/ex/rubyname.rb
rmagick-2.12.1 doc/ex/rubyname.rb
rmagick-2.12.0 doc/ex/rubyname.rb
rmagick-2.11.1 doc/ex/rubyname.rb
rmagick-2.10.0 doc/ex/rubyname.rb
rmagick-2.11.0 doc/ex/rubyname.rb
rmagick-1.15.10 doc/ex/rubyname.rb
rmagick-1.15.12 doc/ex/rubyname.rb
rmagick-1.15.11 doc/ex/rubyname.rb
rmagick-1.15.13 doc/ex/rubyname.rb
rmagick-1.15.14 doc/ex/rubyname.rb
rmagick-1.15.15 doc/ex/rubyname.rb
rmagick-1.15.16 doc/ex/rubyname.rb
rmagick-1.15.17 doc/ex/rubyname.rb