Sha256: abf06f07847b264c718424961557c947ed97bb6c5e2ebc3d6319e3653fce92e1

Contents?: true

Size: 537 Bytes

Versions: 13

Compression:

Stored size: 537 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.g.translate(100, 60) do |grp|
    grp.text.styles(:font_family=>'Verdana', :font_size=>45) do |txt|
      txt.tspan('Rotation')
      txt.tspan(' propogates').rotate(20).styles(:fill=>'red') do |tsp|
        tsp.tspan(' to descendents').styles(:fill=>'green')
      end
    end
  end
  canvas.rect(997, 297).styles(:fill=>'none', :stroke=>'blue')
end

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

Version data entries

13 entries across 13 versions & 3 rubygems

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