Sha256: 77ab2349fe05feaa8500aa8589c036507d0867b9db6a1c5ed36a6a75ea9a81bb

Contents?: true

Size: 587 Bytes

Versions: 15

Compression:

Stored size: 587 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

15 entries across 15 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/text01.rb
rmagick-2.13.3 doc/ex/text01.rb
rmagick-2.13.3.rc1 doc/ex/text01.rb
rmagick-2.13.2 doc/ex/text01.rb
rdp-rmagick-0.0.0 doc/ex/text01.rb
rmagick-2.13.1 doc/ex/text01.rb
rmagick-2.12.2 doc/ex/text01.rb
rmagick-2.12.1 doc/ex/text01.rb
rmagick-2.12.0 doc/ex/text01.rb
rmagick-2.11.1 doc/ex/text01.rb
rmagick-2.10.0 doc/ex/text01.rb
rmagick-2.11.0 doc/ex/text01.rb
rmagick-2.9.0 doc/ex/text01.rb
rmagick-2.9.1 doc/ex/text01.rb
rmagick-2.9.2 doc/ex/text01.rb