[cairo-commit] rcairo/src cairo.def, 1.12, 1.13 rb_cairo.h, 1.17, 1.18 rb_cairo_constants.c, 1.8, 1.9

Kouhei Sutou commit at pdx.freedesktop.org
Wed Aug 13 05:05:32 PDT 2008


Committed by: kou

Update of /cvs/cairo/rcairo/src
In directory kemper:/tmp/cvs-serv6150/src

Modified Files:
	cairo.def rb_cairo.h rb_cairo_constants.c 
Log Message:
        * src/rb_cairo.h, src/cairo.def, src/rb_cairo_constants.c
        (Cairo::LCDFilter): add.

        * test/test_constants.rb: add.


Index: cairo.def
===================================================================
RCS file: /cvs/cairo/rcairo/src/cairo.def,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cairo.def	11 Apr 2008 03:01:33 -0000	1.12
+++ cairo.def	13 Aug 2008 12:05:29 -0000	1.13
@@ -48,6 +48,7 @@
     rb_mCairo_Filter          DATA
     rb_mCairo_SVGVersion      DATA
     rb_mCairo_PSLevel         DATA
+    rb_mCairo_LCDFilter       DATA
 
     rb_mCairo_Color           DATA
     rb_cCairo_Color_Base      DATA

Index: rb_cairo.h
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- rb_cairo.h	19 Jun 2008 13:00:18 -0000	1.17
+++ rb_cairo.h	13 Aug 2008 12:05:29 -0000	1.18
@@ -119,6 +119,9 @@
 RB_CAIRO_VAR VALUE rb_mCairo_Extend;
 RB_CAIRO_VAR VALUE rb_mCairo_Filter;
 RB_CAIRO_VAR VALUE rb_mCairo_SVGVersion;
+RB_CAIRO_VAR VALUE rb_mCairo_PSLevel;
+RB_CAIRO_VAR VALUE rb_mCairo_LCDFilter;
+RB_CAIRO_VAR VALUE rb_mCairo_SVGVersion;
 RB_CAIRO_VAR VALUE rb_mCairo_Color;
 RB_CAIRO_VAR VALUE rb_cCairo_Color_Base;
 RB_CAIRO_VAR VALUE rb_cCairo_Paper;

Index: rb_cairo_constants.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_constants.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- rb_cairo_constants.c	19 Jun 2008 13:00:18 -0000	1.8
+++ rb_cairo_constants.c	13 Aug 2008 12:05:29 -0000	1.9
@@ -33,6 +33,7 @@
 VALUE rb_mCairo_Filter;
 VALUE rb_mCairo_SVGVersion = Qnil;
 VALUE rb_mCairo_PSLevel = Qnil;
+VALUE rb_mCairo_LCDFilter = Qnil;
 
 #define CAIRO_OPERATOR_MIN CAIRO_OPERATOR_CLEAR
 #define CAIRO_OPERATOR_MAX CAIRO_OPERATOR_SATURATE
@@ -85,6 +86,9 @@
 #define CAIRO_PS_LEVEL_MIN CAIRO_PS_LEVEL_2
 #define CAIRO_PS_LEVEL_MAX CAIRO_PS_LEVEL_3
 
+#define CAIRO_LCD_FILTER_MIN CAIRO_LCD_FILTER_DEFAULT
+#define CAIRO_LCD_FILTER_MAX CAIRO_LCD_FILTER_FIR5
+
 #define DEFINE_RVAL2ENUM(name, const_name)                      \
 cairo_ ## name ## _t                                            \
 rb_cairo_ ## name ## _from_ruby_object (VALUE rb_ ## name)      \
@@ -135,6 +139,10 @@
 #  endif
 #endif
 
+#if CAIRO_CHECK_VERSION(1, 7, 2)
+DEFINE_RVAL2ENUM(lcd_filter, LCD_FILTER)
+#endif
+
 #if defined(RB_CAIRO_PLATFORM_WIN32) && !defined(PS_LEVEL_ENUM_DEFINED)
 void
 rb_cairo_ps_level_from_ruby_object (VALUE rb_ps_level)
@@ -459,4 +467,18 @@
                               cr_ps_level_to_string, -1);
 #  endif
 #endif
+
+#if CAIRO_CHECK_VERSION(1, 7, 2)
+  rb_mCairo_LCDFilter = rb_define_module_under (rb_mCairo, "LCDFilter");
+  rb_define_const (rb_mCairo_LCDFilter, "DEFAULT",
+                   INT2FIX (CAIRO_LCD_FILTER_DEFAULT));
+  rb_define_const (rb_mCairo_LCDFilter, "NONE",
+                   INT2FIX (CAIRO_LCD_FILTER_NONE));
+  rb_define_const (rb_mCairo_LCDFilter, "INTRA_PIXEL",
+                   INT2FIX (CAIRO_LCD_FILTER_INTRA_PIXEL));
+  rb_define_const (rb_mCairo_LCDFilter, "FIR3",
+                   INT2FIX (CAIRO_LCD_FILTER_FIR3));
+  rb_define_const (rb_mCairo_LCDFilter, "FIR5",
+                   INT2FIX (CAIRO_LCD_FILTER_FIR5));
+#endif
 }



More information about the cairo-commit mailing list