Lines can now be rendered in the Gtk2SVG gem

#!/usr/bin/env ruby

# file: draw3.rb

require 'gtk2svg'

s =<<SVG
<svg width="400" height="110">
   <line x1="0" y1="0" x2="200" y2="200" style="stroke:rgb(255,0,0);stroke-width:2" />
</svg>
SVG

a = Gtk2SVG::Render.new(s).to_a

area = Gtk::DrawingArea.new

area.signal_connect("expose_event") do

  drawing = Gtk2SVG::DrawingInstructions.new area
  drawing.render a

end

Gtk::Window.new.add(area).show_all
Gtk.main

Screenshot

Screenshot of a Gtk2 application displaying a line