Sha256: 9f38119ad99f85e71140041c2b3ab7e5b9e1df87fc08553e62682648c5ffe391

Contents?: true

Size: 575 Bytes

Versions: 13

Compression:

Stored size: 575 Bytes

Contents

#!/usr/bin/env 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) do
  self.fill = 'gray83'
end

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

text.annotate(canvas, 0,0,0,0, Text) do
  self.fill = 'darkred'
end

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

Version data entries

13 entries across 13 versions & 3 rubygems

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