[cairo-commit:00054] rcairo/rcairo [master] enable CAIRO_FORMAT_RGB16_565 re-enabled in cairo 1.10.
null+rcairo at clear-code.com
null+rcairo at clear-code.com
Sat Sep 11 10:25:35 EDT 2010
Kouhei Sutou 2010-09-11 14:25:35 +0000 (Sat, 11 Sep 2010)
New Revision: 7cc3658ad2b016cd99d27cc94ddcde56bfd0bd69
Log:
enable CAIRO_FORMAT_RGB16_565 re-enabled in cairo 1.10.
Modified files:
ext/cairo/rb_cairo_constants.c
Modified: ext/cairo/rb_cairo_constants.c (+6 -3)
===================================================================
--- ext/cairo/rb_cairo_constants.c 2010-09-11 12:24:21 +0000 (6484144)
+++ ext/cairo/rb_cairo_constants.c 2010-09-11 14:25:35 +0000 (3eb8f06)
@@ -5,6 +5,7 @@
* $Author: kou $
* $Date: 2008-09-19 12:56:27 $
*
+ * Copyright 2005-2010 Kouhei Sutou <kou at cozmixng.org>
* Copyright 2005 Øyvind Kolås <pippin at freedesktop.org>
* Copyright 2004-2005 MenTaLguY <mental at rydia.com>
*
@@ -75,7 +76,7 @@ VALUE rb_mCairo_MimeType = Qnil;
#define CAIRO_CONTENT_MAX CAIRO_CONTENT_COLOR_ALPHA
#define CAIRO_FORMAT_MIN CAIRO_FORMAT_ARGB32
-#define CAIRO_FORMAT_MAX CAIRO_FORMAT_A1
+#define CAIRO_FORMAT_MAX CAIRO_FORMAT_RGB16_565
#define CAIRO_EXTEND_MIN CAIRO_EXTEND_NONE
#define CAIRO_EXTEND_MAX CAIRO_EXTEND_REFLECT
@@ -482,6 +483,10 @@ Init_cairo_constants (void)
/* cairo_format_t */
rb_mCairo_Format = rb_define_module_under (rb_mCairo, "Format");
+#if CAIRO_CHECK_VERSION(1, 10, 0)
+ rb_define_const (rb_mCairo_Format, "INVALID",
+ INT2FIX (CAIRO_FORMAT_INVALID));
+#endif
rb_define_const (rb_mCairo_Format, "ARGB32",
INT2FIX (CAIRO_FORMAT_ARGB32));
rb_define_const (rb_mCairo_Format, "RGB24",
@@ -490,10 +495,8 @@ Init_cairo_constants (void)
INT2FIX (CAIRO_FORMAT_A8));
rb_define_const (rb_mCairo_Format, "A1",
INT2FIX (CAIRO_FORMAT_A1));
-#if !CAIRO_CHECK_VERSION(1, 3, 0)
rb_define_const (rb_mCairo_Format, "RGB16_565",
INT2FIX (CAIRO_FORMAT_RGB16_565));
-#endif
#if CAIRO_CHECK_VERSION(1, 5, 8)
rb_define_singleton_method (rb_mCairo_Format, "stride_for_width",
More information about the cairo-commit
mailing list