From bf1898d0a4e00b40fbecb8570e904dd8dd3b824c Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Sun, 18 Nov 2007 22:15:29 +0000 Subject: [PATCH] * Improve the example in README --- ruby/README | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruby/README b/ruby/README index 055c7b0..1b05d65 100644 --- a/ruby/README +++ b/ruby/README @@ -136,7 +136,7 @@ c.export_memory("irc")' \endcode \code -$ ruby -e 'puts Cucul::Canvas.new(6,3).draw_thin_polyline([[0,0], [2,0], +$ ruby -e 'puts Cucul::Canvas.new(6,3).draw_thin_polyline([[0,0], [0,2], [5,2],[0,0]]).export_memory("irc")' -. | `. @@ -161,8 +161,12 @@ And now a real one: \code require 'caca' -d = Caca::Display.new(Cucul::Canvas.new(20,10)) +c = Cucul::Canvas.new(20,10) +c.put_str(2, 3, "plop!") +c.draw_thin_polyline([[0,0], [0,2], [5,2], [0,0]]) +d = Caca::Display.new(c) d.title = "Test !" +d.refresh while((e = d.get_event(Caca::Event, -1)) && ! e.kind_of?(Caca::Event::Quit)) p e