Sha256: 5b5731ee2428f18e4b2dafe9d8f5ddfa536d39fdc71da177b0b46b03b235ce0e
Contents?: true
Size: 558 Bytes
Versions: 6
Compression:
Stored size: 558 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
6 entries across 6 versions & 1 rubygems