Ignore:
Timestamp:
Nov 17, 2007, 3:15:01 AM (13 years ago)
Author:
Sam Hocevar
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/ruby/README

    r1997 r2003  
     1/* $Id$ */ /** \page libcaca-ruby Libcaca ruby bindings
     2
    13This a Ruby binding for libcucul, libcaca will be added later.
    24
     
    1921What is currently available is :
    2022
     23\code
    2124$ irb -rcucul
    2225irb(main):001:0> Cucul.constants
     
    2528"UNDERLINE", "RED", "WHITE", "BLACK", "LIGHTCYAN", "LIGHTGRAY",
    2629"ITALICS", "CYAN", "YELLOW", "LIGHTGREEN", "Canvas", "Font"]
     30\endcode
    2731
     32\code
    2833irb(main):002:0> Cucul::Canvas.methods.sort -
    2934Cucul::Canvas.ancestors[1].methods
    3035=> ["export_list", "import_list"]
     36\endcode
    3137
     38\code
    3239irb(main):003:0> Cucul::Canvas.instance_methods.sort -
    3340Cucul::Canvas.ancestors[1].instance_methods
     
    4552"set_frame_name", "set_handle", "set_height", "set_size", "set_width",
    4653"stretch_left", "stretch_right", "width", "width="]
     54\endcode
    4755
    4856irb(main):004:0> Cucul::Font.methods.sort -
     
    5664And here are sample uses :
    5765
     66\code
    5867$ ruby -rcucul -e 'c=Cucul::Canvas.new(6, 3).fill_box(0,0,2,2,"#"[0]);
    5968c2=Cucul::Canvas.new(1, 1).put_str(0,0,"x"); c.blit(1,1,c2); puts
     
    6271#x#   
    6372### 
     73\endcode
    6474
     75\code
    6576$ ruby -e 'puts Cucul::Canvas.new(6,3).draw_thin_polyline([[0,0], [2,0],
    6677[5,2],[0,0]]).export_memory("irc")'
     
    6879| `. 
    6980----`-
     81\endcode
    7082
     83\code
    7184$ ruby -rcucul -e 'p Cucul::Canvas.export_list'
    7285[["caca", "native libcaca format"], ["ansi", "ANSI"], ["utf8", "UTF-8
     
    7588["irc", "IRC with mIRC colours"], ["ps", "PostScript document"], ["svg",
    7689"SVG vector image"], ["tga", "TGA image"]]
     90\endcode
    7791
     92\code
    7893$ ruby -rcucul -e 'p Cucul::Font.list'
    7994["Monospace 9", "Monospace Bold 12"]
     95\endcode
     96
     97*/
Note: See TracChangeset for help on using the changeset viewer.