Browse Source

* Improve the example in README

tags/v0.99.beta14
Pascal Terjan pterjan 17 years ago
parent
commit
bf1898d0a4
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      ruby/README

+ 6
- 2
ruby/README View File

@@ -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


Loading…
Cancel
Save