Skip to content

Instantly share code, notes, and snippets.

@bentomas
Created March 15, 2010 06:46
Show Gist options
  • Save bentomas/332587 to your computer and use it in GitHub Desktop.
Save bentomas/332587 to your computer and use it in GitHub Desktop.
require "rubygems"
require "RMagick"
require "rvg/rvg"
rvg = Magick::RVG.new(150, 100) do |canvas|
canvas.background_fill = 'white'
txt = canvas.text(140, 20).styles(
:font_size => 28,
:text_anchor => "end"
)
txt.tspan("first")
txt.tspan("second")
end
rvg.draw.write("output.gif")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment