Ignore:
Timestamp:
Nov 16, 2007, 11:37:20 PM (12 years ago)
Author:
Pascal Terjan
Message:
  • Update README
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/ruby/README

    r1983 r1997  
    33There is no real documentation but "methods" on any object should help you :)
    44
    5 The only object available for now is Cucul::Canvas (meaning that only
    6 functions that have a cucul_canvas_t* as first argument except
    7 cucul_dither_bitmap are available).
     5The objects available for now are :
     6
     7- Cucul::Canvas (functions that have a cucul_canvas_t* as first argument)
     8 * dither_bitmap is missing as Cucul::Dither is not yet implemented
     9
     10- Cucul::Font (functions that have a cucul_font_t* as first argument)
     11 * The constructor can currently only accept the name of a builtin font
    812
    913I tried to follow Ruby spirit meaning that :
    10 - most of the Cucul::Canvas methods return self
     14- most of the methods return self
    1115- the methods set_foo with only an argument are also available as foo=
    1216(returning the value instead of self)
     
    2024"MAGENTA", "DEFAULT", "TRANSPARENT", "BLUE", "LIGHTRED", "DARKGRAY",
    2125"UNDERLINE", "RED", "WHITE", "BLACK", "LIGHTCYAN", "LIGHTGRAY",
    22 "ITALICS", "CYAN", "YELLOW", "LIGHTGREEN", "Canvas"]
     26"ITALICS", "CYAN", "YELLOW", "LIGHTGREEN", "Canvas", "Font"]
    2327
    2428irb(main):002:0> Cucul::Canvas.methods.sort -
     
    4145"set_frame_name", "set_handle", "set_height", "set_size", "set_width",
    4246"stretch_left", "stretch_right", "width", "width="]
     47
     48irb(main):004:0> Cucul::Font.methods.sort -
     49Cucul::Font.ancestors[1].methods
     50=> ["list"]
     51
     52irb(main):005:0> Cucul::Font.instance_methods.sort -
     53Cucul::Font.ancestors[1].instance_methods
     54=> ["blocks", "height", "width"]
    4355
    4456And here are sample uses :
     
    6375["irc", "IRC with mIRC colours"], ["ps", "PostScript document"], ["svg",
    6476"SVG vector image"], ["tga", "TGA image"]]
     77
     78$ ruby -rcucul -e 'p Cucul::Font.list'
     79["Monospace 9", "Monospace Bold 12"]
Note: See TracChangeset for help on using the changeset viewer.