Changeset 2023


Ignore:
Timestamp:
Nov 18, 2007, 11:15:29 PM (13 years ago)
Author:
Pascal Terjan
Message:
  • Improve the example in README
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/ruby/README

    r2021 r2023  
    137137
    138138\code
    139 $ ruby -e 'puts Cucul::Canvas.new(6,3).draw_thin_polyline([[0,0], [2,0],
     139$ ruby -e 'puts Cucul::Canvas.new(6,3).draw_thin_polyline([[0,0], [0,2],
    140140[5,2],[0,0]]).export_memory("irc")'
    141141-.   
     
    162162\code
    163163require 'caca'
    164 d = Caca::Display.new(Cucul::Canvas.new(20,10))
     164c = Cucul::Canvas.new(20,10)
     165c.put_str(2, 3, "plop!")
     166c.draw_thin_polyline([[0,0], [0,2], [5,2], [0,0]])
     167d = Caca::Display.new(c)
    165168d.title = "Test !"
     169d.refresh
    166170while((e = d.get_event(Caca::Event, -1)) &&
    167171       ! e.kind_of?(Caca::Event::Quit))
Note: See TracChangeset for help on using the changeset viewer.