Sha256: 2780d382b0b7b3cbb6ffd8657dab92c03d60feea48e40c2728680c0415c09c2c

Contents?: true

Size: 593 Bytes

Versions: 47

Compression:

Stored size: 593 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 tspan01 - using tspan to change visual attributes"
    canvas.g.styles(:font_family=>'Verdana', :font_size=>45) do |grp|
        grp.text(200, 150, "You are").styles(:fill=>'blue') do |txt|
            txt.tspan(" not").styles(:font_weight=>'bold', :fill=>'red')
            txt.tspan(" a banana")
        end
    end
    canvas.rect(997, 297).styles(:fill=>'none', :stroke=>'blue')
end

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

Version data entries

47 entries across 47 versions & 2 rubygems

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