Changeset 2008


Ignore:
Timestamp:
Nov 17, 2007, 1:21:21 PM (12 years ago)
Author:
Pascal Terjan
Message:
  • Add Cucul::Dither (incomplete)
Location:
libcaca/trunk/ruby
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/ruby/Makefile.am

    r1996 r2008  
    88
    99cucul_la_CPPFLAGS = -I$(top_srcdir)/cucul -I$(RUBY_ARCHDIR)
    10 cucul_la_SOURCES = cucul.c cucul-canvas.c cucul-font.c
     10cucul_la_SOURCES = cucul.c cucul-canvas.c cucul-dither.c cucul-font.c
    1111cucul_la_LDFLAGS = -module -avoid-version -shared -L$(RUBY_LIBDIR) -l$(RUBY_SO_NAME)
    1212cucul_la_LIBADD = ../cucul/libcucul.la
    1313
    1414EXTRA_DIST = cucul-canvas.h \
    15              cucul-canvas.h \
     15             cucul-dither.h \
     16             cucul-font.h \
    1617             common.h \
    1718             test.rb \
    1819             t/tc_canvas.rb \
     20             t/tc_dither.rb \
    1921             t/tc_font.rb \
    2022             t/tc_frame.rb \
  • libcaca/trunk/ruby/README

    r2003 r2008  
    88
    99- Cucul::Canvas (functions that have a cucul_canvas_t* as first argument)
    10  * dither_bitmap is missing as Cucul::Dither is not yet implemented
     10
     11- Cucul::Dither (functions that have a cucul_dither_t* as first argument)
    1112
    1213- Cucul::Font (functions that have a cucul_font_t* as first argument)
     
    2728"MAGENTA", "DEFAULT", "TRANSPARENT", "BLUE", "LIGHTRED", "DARKGRAY",
    2829"UNDERLINE", "RED", "WHITE", "BLACK", "LIGHTCYAN", "LIGHTGRAY",
    29 "ITALICS", "CYAN", "YELLOW", "LIGHTGREEN", "Canvas", "Font"]
     30"ITALICS", "CYAN", "YELLOW", "LIGHTGREEN", "Canvas", "Dither", "Font"]
    3031\endcode
    3132
     
    5455\endcode
    5556
     57\code
    5658irb(main):004:0> Cucul::Font.methods.sort -
    5759Cucul::Font.ancestors[1].methods
    5860=> ["list"]
     61\endcode
    5962
     63\code
    6064irb(main):005:0> Cucul::Font.instance_methods.sort -
    6165Cucul::Font.ancestors[1].instance_methods
    6266=> ["blocks", "height", "width"]
     67\endcode
     68
     69\code
     70irb(main):006:0> Cucul::Dither.instance_methods.sort -
     71Cucul::Dither.ancestors[1].instance_methods => ["brightness=",
     72"contrast=", "gamma=", "palette=", "set_brightness", "set_contrast",
     73"set_gamma", "set_palette"]
     74\endcode
    6375
    6476And here are sample uses :
  • libcaca/trunk/ruby/cucul.c

    r1995 r2008  
    1414
    1515#include "cucul-canvas.h"
     16#include "cucul-dither.h"
    1617#include "cucul-font.h"
    1718
     
    4546
    4647    Init_cucul_canvas(mCucul);
     48    Init_cucul_dither(mCucul);
    4749    Init_cucul_font(mCucul);
    4850}
Note: See TracChangeset for help on using the changeset viewer.