Sha256: e3158a5fa2a845006facc24b619eb350f556b03ab657a9de7e338816dee2fa50

Contents?: true

Size: 562 Bytes

Versions: 13

Compression:

Stored size: 562 Bytes

Contents

require 'rvg/rvg'

Magick::RVG.dpi = 90

rvg = Magick::RVG.new(10.cm, 3.cm).viewbox(0,0,1000,300) do |canvas|
  canvas.background_fill = 'white'
  canvas.desc = "Example text01 - 'Hello, out there' in blue"
  canvas.text(250, 150, 'Hello, out there')
    .styles(:font_family=>'Verdana', :font_size=>55, :fill=>'blue', :font_weight=>'normal', :font_style=>'normal')
  canvas.circle(5, 250, 150).styles(:fill=>'red')

  # Show outline of canvas using 'rect' element
  canvas.rect(997, 297).styles(:fill=>'none', :stroke=>'blue')
end

rvg.draw.write('text01.gif')

Version data entries

13 entries across 13 versions & 3 rubygems

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