Sha256: 9dadae118c944283b84aed62c74d789b53323097b9ea3e199233f8cd122e1fbe

Contents?: true

Size: 655 Bytes

Versions: 59

Compression:

Stored size: 655 Bytes

Contents

require 'rvg/rvg'

Magick::RVG.dpi = 90
Fill = %w{yellow pink green blue cyan red purple brown}

rvg = Magick::RVG.new(6.cm, 6.cm).viewbox(0,0,600,600) do |canvas|
    canvas.background_fill = 'white'

    ref_text = Magick::RVG::Tspan.new("Referenced").styles(:font_size=>52, :font_weight=>'bold')

    canvas.g.translate(300,270) do |grp|
        angle = 0
        8.times do |n|
            grp.text do |txt|
                txt.tref(ref_text).d(0,30).rotate(angle).styles(:fill=>Fill[n])
                angle += 45
            end
        end
    end

    canvas.rect(596,596).styles(:fill=>'none',:stroke=>'blue')

end

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

Version data entries

59 entries across 59 versions & 2 rubygems

Version Path
rmagick-1.9.1 doc/ex/tref01.rb
rmagick-2.2.0 doc/ex/tref01.rb
rmagick-2.3.0 doc/ex/tref01.rb
rmagick-2.2.2 doc/ex/tref01.rb
rmagick-2.0.0 doc/ex/tref01.rb
rmagick-1.9.3 doc/ex/tref01.rb
rmagick-2.1.0 doc/ex/tref01.rb
rmagick-2.4.0 doc/ex/tref01.rb
rmagick-2.5.0 doc/ex/tref01.rb
rmagick-2.5.1 doc/ex/tref01.rb
rmagick-2.5.2 doc/ex/tref01.rb
rmagick-2.6.0 doc/ex/tref01.rb
rmagick-2.7.2 doc/ex/tref01.rb
rmagick-2.7.0 doc/ex/tref01.rb
rmagick-2.7.1 doc/ex/tref01.rb
rmagick-2.8.0 doc/ex/tref01.rb
rmagick-2.9.1 doc/ex/tref01.rb
rmagick-2.9.0 doc/ex/tref01.rb
rmagick-2.9.2 doc/ex/tref01.rb