[cairo-commit] rcairo/src cairo.def, 1.2, 1.3 rb_cairo.h, 1.4, 1.5 rb_cairo_constants.c, 1.3, 1.4 rb_cairo_font_face.c, 1.2, 1.3 rb_cairo_surface.c, 1.6, 1.7
Kouhei Sutou
commit at pdx.freedesktop.org
Sat May 19 19:45:52 PDT 2007
Committed by: kou
Update of /cvs/cairo/rcairo/src
In directory kemper:/tmp/cvs-serv2361/src
Modified Files:
cairo.def rb_cairo.h rb_cairo_constants.c rb_cairo_font_face.c
rb_cairo_surface.c
Log Message:
* src/rb_cairo.h, src/cairo.def, src/rb_cairo_constants.rb:
added a module for each enum type.
* src/lib/cairo/constants.rb: kept the backward compatibility.
Index: cairo.def
===================================================================
RCS file: /cvs/cairo/rcairo/src/cairo.def,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cairo.def 19 May 2007 00:25:42 -0000 1.2
+++ cairo.def 20 May 2007 02:45:40 -0000 1.3
@@ -22,8 +22,30 @@
rb_cCairo_PSSurface DATA
rb_cCairo_SVGSurface DATA
rb_cCairo_WIN32Surface DATA
+
+ rb_mCairo_Operator DATA
+ rb_mCairo_Antialias DATA
+ rb_mCairo_FillRule DATA
+ rb_mCairo_LineCap DATA
+ rb_mCairo_LineJoin DATA
+ rb_mCairo_FontSlant DATA
+ rb_mCairo_FontWeight DATA
+ rb_mCairo_SubpixelOrder DATA
+ rb_mCairo_HintStyle DATA
+ rb_mCairo_HintMetrics DATA
+ rb_mCairo_FontType DATA
+ rb_mCairo_PathDataType DATA
+ rb_mCairo_Content DATA
+ rb_mCairo_SurfaceType DATA
+ rb_mCairo_Format DATA
+ rb_mCairo_PatternType DATA
+ rb_mCairo_Extend DATA
+ rb_mCairo_Filter DATA
+ rb_mCairo_SVGVersion DATA
+
rb_mCairo_Color DATA
rb_cCairo_Color_Base DATA
+
rb_cairo_context_from_ruby_object
rb_cairo_context_to_ruby_object
rb_cairo_path_from_ruby_object
Index: rb_cairo.h
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- rb_cairo.h 19 May 2007 00:25:42 -0000 1.4
+++ rb_cairo.h 20 May 2007 02:45:40 -0000 1.5
@@ -76,6 +76,27 @@
RUBY_CAIRO_VAR VALUE rb_cCairo_PSSurface;
RUBY_CAIRO_VAR VALUE rb_cCairo_SVGSurface;
RUBY_CAIRO_VAR VALUE rb_cCairo_WIN32Surface;
+
+RUBY_CAIRO_VAR VALUE rb_mCairo_Operator;
+RUBY_CAIRO_VAR VALUE rb_mCairo_Antialias;
+RUBY_CAIRO_VAR VALUE rb_mCairo_FillRule;
+RUBY_CAIRO_VAR VALUE rb_mCairo_LineCap;
+RUBY_CAIRO_VAR VALUE rb_mCairo_LineJoin;
+RUBY_CAIRO_VAR VALUE rb_mCairo_FontSlant;
+RUBY_CAIRO_VAR VALUE rb_mCairo_FontWeight;
+RUBY_CAIRO_VAR VALUE rb_mCairo_SubpixelOrder;
+RUBY_CAIRO_VAR VALUE rb_mCairo_HintStyle;
+RUBY_CAIRO_VAR VALUE rb_mCairo_HintMetrics;
+RUBY_CAIRO_VAR VALUE rb_mCairo_FontType;
+RUBY_CAIRO_VAR VALUE rb_mCairo_PathDataType;
+RUBY_CAIRO_VAR VALUE rb_mCairo_Content;
+RUBY_CAIRO_VAR VALUE rb_mCairo_SurfaceType;
+RUBY_CAIRO_VAR VALUE rb_mCairo_Format;
+RUBY_CAIRO_VAR VALUE rb_mCairo_PatternType;
+RUBY_CAIRO_VAR VALUE rb_mCairo_Extend;
+RUBY_CAIRO_VAR VALUE rb_mCairo_Filter;
+RUBY_CAIRO_VAR VALUE rb_mCairo_SVGVersion;
+
RUBY_CAIRO_VAR VALUE rb_mCairo_Color;
RUBY_CAIRO_VAR VALUE rb_cCairo_Color_Base;
Index: rb_cairo_constants.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_constants.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- rb_cairo_constants.c 3 May 2007 02:47:39 -0000 1.3
+++ rb_cairo_constants.c 20 May 2007 02:45:40 -0000 1.4
@@ -16,6 +16,26 @@
#include "rb_cairo.h"
#include "rb_cairo_private.h"
+VALUE rb_mCairo_Operator;
+VALUE rb_mCairo_Antialias;
+VALUE rb_mCairo_FillRule;
+VALUE rb_mCairo_LineCap;
+VALUE rb_mCairo_LineJoin;
+VALUE rb_mCairo_FontSlant;
+VALUE rb_mCairo_FontWeight;
+VALUE rb_mCairo_SubpixelOrder;
+VALUE rb_mCairo_HintStyle;
+VALUE rb_mCairo_HintMetrics;
+VALUE rb_mCairo_FontType;
+VALUE rb_mCairo_PathDataType;
+VALUE rb_mCairo_Content;
+VALUE rb_mCairo_SurfaceType;
+VALUE rb_mCairo_Format;
+VALUE rb_mCairo_PatternType;
+VALUE rb_mCairo_Extend;
+VALUE rb_mCairo_Filter;
+VALUE rb_mCairo_SVGVersion;
+
#define CAIRO_OPERATOR_MIN CAIRO_OPERATOR_CLEAR
#define CAIRO_OPERATOR_MAX CAIRO_OPERATOR_SATURATE
@@ -111,238 +131,259 @@
Init_cairo_constants (void)
{
/* cairo_operator_t */
- rb_define_const (rb_mCairo, "OPERATOR_CLEAR",
+ rb_mCairo_Operator = rb_define_module_under (rb_mCairo, "Operator");
+ rb_define_const (rb_mCairo_Operator, "CLEAR",
INT2FIX (CAIRO_OPERATOR_CLEAR));
- rb_define_const (rb_mCairo, "OPERATOR_SOURCE",
+ rb_define_const (rb_mCairo_Operator, "SOURCE",
INT2FIX (CAIRO_OPERATOR_SOURCE));
- rb_define_const (rb_mCairo, "OPERATOR_OVER",
+ rb_define_const (rb_mCairo_Operator, "OVER",
INT2FIX (CAIRO_OPERATOR_OVER));
- rb_define_const (rb_mCairo, "OPERATOR_IN",
+ rb_define_const (rb_mCairo_Operator, "IN",
INT2FIX (CAIRO_OPERATOR_IN));
- rb_define_const (rb_mCairo, "OPERATOR_OUT",
+ rb_define_const (rb_mCairo_Operator, "OUT",
INT2FIX (CAIRO_OPERATOR_OUT));
- rb_define_const (rb_mCairo, "OPERATOR_ATOP",
+ rb_define_const (rb_mCairo_Operator, "ATOP",
INT2FIX (CAIRO_OPERATOR_ATOP));
-
- rb_define_const (rb_mCairo, "OPERATOR_DEST",
+
+ rb_define_const (rb_mCairo_Operator, "DEST",
INT2FIX (CAIRO_OPERATOR_DEST));
- rb_define_const (rb_mCairo, "OPERATOR_DEST_OVER",
+ rb_define_const (rb_mCairo_Operator, "DEST_OVER",
INT2FIX (CAIRO_OPERATOR_DEST_OVER));
- rb_define_const (rb_mCairo, "OPERATOR_DEST_IN",
+ rb_define_const (rb_mCairo_Operator, "DEST_IN",
INT2FIX (CAIRO_OPERATOR_DEST_IN));
- rb_define_const (rb_mCairo, "OPERATOR_DEST_OUT",
+ rb_define_const (rb_mCairo_Operator, "DEST_OUT",
INT2FIX (CAIRO_OPERATOR_DEST_OUT));
- rb_define_const (rb_mCairo, "OPERATOR_DEST_ATOP",
+ rb_define_const (rb_mCairo_Operator, "DEST_ATOP",
INT2FIX (CAIRO_OPERATOR_DEST_ATOP));
- rb_define_const (rb_mCairo, "OPERATOR_XOR",
+ rb_define_const (rb_mCairo_Operator, "XOR",
INT2FIX (CAIRO_OPERATOR_XOR));
- rb_define_const (rb_mCairo, "OPERATOR_ADD",
+ rb_define_const (rb_mCairo_Operator, "ADD",
INT2FIX (CAIRO_OPERATOR_ADD));
- rb_define_const (rb_mCairo, "OPERATOR_SATURATE",
+ rb_define_const (rb_mCairo_Operator, "SATURATE",
INT2FIX (CAIRO_OPERATOR_SATURATE));
-
+
/* cairo_antialias_t */
- rb_define_const (rb_mCairo, "ANTIALIAS_DEFAULT",
+ rb_mCairo_Antialias = rb_define_module_under (rb_mCairo, "Antialias");
+ rb_define_const (rb_mCairo_Antialias, "DEFAULT",
INT2FIX (CAIRO_ANTIALIAS_DEFAULT));
- rb_define_const (rb_mCairo, "ANTIALIAS_NONE",
+ rb_define_const (rb_mCairo_Antialias, "NONE",
INT2FIX (CAIRO_ANTIALIAS_NONE));
- rb_define_const (rb_mCairo, "ANTIALIAS_GRAY",
+ rb_define_const (rb_mCairo_Antialias, "GRAY",
INT2FIX (CAIRO_ANTIALIAS_GRAY));
- rb_define_const (rb_mCairo, "ANTIALIAS_SUBPIXEL",
+ rb_define_const (rb_mCairo_Antialias, "SUBPIXEL",
INT2FIX (CAIRO_ANTIALIAS_SUBPIXEL));
/* cairo_fill_rule_t */
- rb_define_const (rb_mCairo, "FILL_RULE_WINDING",
+ rb_mCairo_FillRule = rb_define_module_under (rb_mCairo, "FillRule");
+ rb_define_const (rb_mCairo_FillRule, "WINDING",
INT2FIX (CAIRO_FILL_RULE_WINDING));
- rb_define_const (rb_mCairo, "FILL_RULE_EVEN_ODD",
+ rb_define_const (rb_mCairo_FillRule, "EVEN_ODD",
INT2FIX (CAIRO_FILL_RULE_EVEN_ODD));
/* cairo_line_cap_t */
- rb_define_const (rb_mCairo, "LINE_CAP_BUTT",
+ rb_mCairo_LineCap = rb_define_module_under (rb_mCairo, "LineCap");
+ rb_define_const (rb_mCairo_LineCap, "BUTT",
INT2FIX (CAIRO_LINE_CAP_BUTT));
- rb_define_const (rb_mCairo, "LINE_CAP_ROUND",
+ rb_define_const (rb_mCairo_LineCap, "ROUND",
INT2FIX (CAIRO_LINE_CAP_ROUND));
- rb_define_const (rb_mCairo, "LINE_CAP_SQUARE",
+ rb_define_const (rb_mCairo_LineCap, "SQUARE",
INT2FIX (CAIRO_LINE_CAP_SQUARE));
/* cairo_line_join_t */
- rb_define_const (rb_mCairo, "LINE_JOIN_MITER",
+ rb_mCairo_LineJoin = rb_define_module_under (rb_mCairo, "LineJoin");
+ rb_define_const (rb_mCairo_LineJoin, "MITER",
INT2FIX (CAIRO_LINE_JOIN_MITER));
- rb_define_const (rb_mCairo, "LINE_JOIN_ROUND",
+ rb_define_const (rb_mCairo_LineJoin, "ROUND",
INT2FIX (CAIRO_LINE_JOIN_ROUND));
- rb_define_const (rb_mCairo, "LINE_JOIN_BEVEL",
+ rb_define_const (rb_mCairo_LineJoin, "BEVEL",
INT2FIX (CAIRO_LINE_JOIN_BEVEL));
/* cairo_font_slant_t */
- rb_define_const (rb_mCairo, "FONT_SLANT_NORMAL",
+ rb_mCairo_FontSlant = rb_define_module_under (rb_mCairo, "FontSlant");
+ rb_define_const (rb_mCairo_FontSlant, "NORMAL",
INT2FIX (CAIRO_FONT_SLANT_NORMAL));
- rb_define_const (rb_mCairo, "FONT_SLANT_ITALIC",
+ rb_define_const (rb_mCairo_FontSlant, "ITALIC",
INT2FIX (CAIRO_FONT_SLANT_ITALIC));
- rb_define_const (rb_mCairo, "FONT_SLANT_OBLIQUE",
+ rb_define_const (rb_mCairo_FontSlant, "OBLIQUE",
INT2FIX (CAIRO_FONT_SLANT_OBLIQUE));
/* cairo_font_weight_t */
- rb_define_const (rb_mCairo, "FONT_WEIGHT_NORMAL",
+ rb_mCairo_FontWeight = rb_define_module_under (rb_mCairo, "FontWeight");
+ rb_define_const (rb_mCairo_FontWeight, "NORMAL",
INT2FIX (CAIRO_FONT_WEIGHT_NORMAL));
- rb_define_const (rb_mCairo, "FONT_WEIGHT_BOLD",
+ rb_define_const (rb_mCairo_FontWeight, "BOLD",
INT2FIX (CAIRO_FONT_WEIGHT_BOLD));
-
+
/* cairo_subpixel_order_t */
- rb_define_const (rb_mCairo, "SUBPIXEL_ORDER_DEFAULT",
+ rb_mCairo_SubpixelOrder = rb_define_module_under (rb_mCairo, "SubpixelOrder");
+ rb_define_const (rb_mCairo_SubpixelOrder, "DEFAULT",
INT2FIX (CAIRO_SUBPIXEL_ORDER_DEFAULT));
- rb_define_const (rb_mCairo, "SUBPIXEL_ORDER_RGB",
+ rb_define_const (rb_mCairo_SubpixelOrder, "RGB",
INT2FIX (CAIRO_SUBPIXEL_ORDER_RGB));
- rb_define_const (rb_mCairo, "SUBPIXEL_ORDER_BGR",
+ rb_define_const (rb_mCairo_SubpixelOrder, "BGR",
INT2FIX (CAIRO_SUBPIXEL_ORDER_BGR));
- rb_define_const (rb_mCairo, "SUBPIXEL_ORDER_VRGB",
+ rb_define_const (rb_mCairo_SubpixelOrder, "VRGB",
INT2FIX (CAIRO_SUBPIXEL_ORDER_VRGB));
- rb_define_const (rb_mCairo, "SUBPIXEL_ORDER_VBGR",
+ rb_define_const (rb_mCairo_SubpixelOrder, "VBGR",
INT2FIX (CAIRO_SUBPIXEL_ORDER_VBGR));
-
+
/* cairo_hint_style_t */
- rb_define_const (rb_mCairo, "HINT_STYLE_DEFAULT",
+ rb_mCairo_HintStyle = rb_define_module_under (rb_mCairo, "HintStyle");
+ rb_define_const (rb_mCairo_HintStyle, "DEFAULT",
INT2FIX (CAIRO_HINT_STYLE_DEFAULT));
- rb_define_const (rb_mCairo, "HINT_STYLE_NONE",
+ rb_define_const (rb_mCairo_HintStyle, "NONE",
INT2FIX (CAIRO_HINT_STYLE_NONE));
- rb_define_const (rb_mCairo, "HINT_STYLE_SLIGHT",
+ rb_define_const (rb_mCairo_HintStyle, "SLIGHT",
INT2FIX (CAIRO_HINT_STYLE_SLIGHT));
- rb_define_const (rb_mCairo, "HINT_STYLE_MEDIUM",
+ rb_define_const (rb_mCairo_HintStyle, "MEDIUM",
INT2FIX (CAIRO_HINT_STYLE_MEDIUM));
- rb_define_const (rb_mCairo, "HINT_STYLE_FULL",
+ rb_define_const (rb_mCairo_HintStyle, "FULL",
INT2FIX (CAIRO_HINT_STYLE_FULL));
/* cairo_hint_metrics_t */
- rb_define_const (rb_mCairo, "HINT_METRICS_DEFAULT",
+ rb_mCairo_HintMetrics = rb_define_module_under (rb_mCairo, "HintMetrics");
+ rb_define_const (rb_mCairo_HintMetrics, "DEFAULT",
INT2FIX (CAIRO_HINT_METRICS_DEFAULT));
- rb_define_const (rb_mCairo, "HINT_METRICS_ON",
+ rb_define_const (rb_mCairo_HintMetrics, "ON",
INT2FIX (CAIRO_HINT_METRICS_ON));
- rb_define_const (rb_mCairo, "HINT_METRICS_OFF",
+ rb_define_const (rb_mCairo_HintMetrics, "OFF",
INT2FIX (CAIRO_HINT_METRICS_OFF));
/* cairo_font_type_t */
- rb_define_const (rb_mCairo, "FONT_TYPE_TOY", INT2FIX(CAIRO_FONT_TYPE_TOY));
- rb_define_const (rb_mCairo, "FONT_TYPE_FT", INT2FIX(CAIRO_FONT_TYPE_FT));
- rb_define_const (rb_mCairo, "FONT_TYPE_WIN32",
- INT2FIX(CAIRO_FONT_TYPE_WIN32));
- rb_define_const (rb_mCairo, "FONT_TYPE_ATSUI",
- INT2FIX(CAIRO_FONT_TYPE_ATSUI));
+ rb_mCairo_FontType = rb_define_module_under (rb_mCairo, "FontType");
+ rb_define_const (rb_mCairo_FontType, "TOY",
+ INT2FIX (CAIRO_FONT_TYPE_TOY));
+ rb_define_const (rb_mCairo_FontType, "FT",
+ INT2FIX (CAIRO_FONT_TYPE_FT));
+ rb_define_const (rb_mCairo_FontType, "WIN32",
+ INT2FIX (CAIRO_FONT_TYPE_WIN32));
+ rb_define_const (rb_mCairo_FontType, "ATSUI",
+ INT2FIX (CAIRO_FONT_TYPE_ATSUI));
/* cairo_path_data_type_t */
- rb_define_const (rb_mCairo, "PATH_MOVE_TO",
+ rb_mCairo_PathDataType = rb_define_module_under (rb_mCairo, "PathDataType");
+ rb_define_const (rb_mCairo_PathDataType, "MOVE_TO",
INT2FIX (CAIRO_PATH_MOVE_TO));
- rb_define_const (rb_mCairo, "PATH_LINE_TO",
+ rb_define_const (rb_mCairo_PathDataType, "LINE_TO",
INT2FIX (CAIRO_PATH_LINE_TO));
- rb_define_const (rb_mCairo, "PATH_CURVE_TO",
+ rb_define_const (rb_mCairo_PathDataType, "CURVE_TO",
INT2FIX (CAIRO_PATH_CURVE_TO));
- rb_define_const (rb_mCairo, "PATH_CLOSE_PATH",
+ rb_define_const (rb_mCairo_PathDataType, "CLOSE_PATH",
INT2FIX (CAIRO_PATH_CLOSE_PATH));
/* cairo_content_t */
- rb_define_const (rb_mCairo, "CONTENT_COLOR",
+ rb_mCairo_Content = rb_define_module_under (rb_mCairo, "Content");
+ rb_define_const (rb_mCairo_Content, "COLOR",
INT2FIX (CAIRO_CONTENT_COLOR));
- rb_define_const (rb_mCairo, "CONTENT_ALPHA",
+ rb_define_const (rb_mCairo_Content, "ALPHA",
INT2FIX (CAIRO_CONTENT_ALPHA));
- rb_define_const (rb_mCairo, "CONTENT_COLOR_ALPHA",
+ rb_define_const (rb_mCairo_Content, "COLOR_ALPHA",
INT2FIX (CAIRO_CONTENT_COLOR_ALPHA));
/* cairo_surface_type_t */
- rb_define_const (rb_mCairo, "SURFACE_TYPE_IMAGE",
+ rb_mCairo_SurfaceType = rb_define_module_under (rb_mCairo, "SurfaceType");
+ rb_define_const (rb_mCairo_SurfaceType, "IMAGE",
INT2FIX (CAIRO_SURFACE_TYPE_IMAGE));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_PDF",
+ rb_define_const (rb_mCairo_SurfaceType, "PDF",
INT2FIX (CAIRO_SURFACE_TYPE_PDF));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_PS",
+ rb_define_const (rb_mCairo_SurfaceType, "PS",
INT2FIX (CAIRO_SURFACE_TYPE_PS));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_XLIB",
+ rb_define_const (rb_mCairo_SurfaceType, "XLIB",
INT2FIX (CAIRO_SURFACE_TYPE_XLIB));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_XCB",
+ rb_define_const (rb_mCairo_SurfaceType, "XCB",
INT2FIX (CAIRO_SURFACE_TYPE_XCB));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_GLITZ",
+ rb_define_const (rb_mCairo_SurfaceType, "GLITZ",
INT2FIX (CAIRO_SURFACE_TYPE_GLITZ));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_QUARTZ",
+ rb_define_const (rb_mCairo_SurfaceType, "QUARTZ",
INT2FIX (CAIRO_SURFACE_TYPE_QUARTZ));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_WIN32",
+ rb_define_const (rb_mCairo_SurfaceType, "WIN32",
INT2FIX (CAIRO_SURFACE_TYPE_WIN32));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_BEOS",
+ rb_define_const (rb_mCairo_SurfaceType, "BEOS",
INT2FIX (CAIRO_SURFACE_TYPE_BEOS));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_DIRECTFB",
+ rb_define_const (rb_mCairo_SurfaceType, "DIRECTFB",
INT2FIX (CAIRO_SURFACE_TYPE_DIRECTFB));
- rb_define_const (rb_mCairo, "SURFACE_TYPE_SVG",
+ rb_define_const (rb_mCairo_SurfaceType, "SVG",
INT2FIX (CAIRO_SURFACE_TYPE_SVG));
#if CAIRO_CHECK_VERSION(1, 3, 0)
- rb_define_const (rb_mCairo, "SURFACE_TYPE_OS2",
+ rb_define_const (rb_mCairo_SurfaceType, "OS2",
INT2FIX (CAIRO_SURFACE_TYPE_OS2));
#endif
/* cairo_format_t */
- rb_define_const (rb_mCairo, "FORMAT_ARGB32",
+ rb_mCairo_Format = rb_define_module_under (rb_mCairo, "Format");
+ rb_define_const (rb_mCairo_Format, "ARGB32",
INT2FIX (CAIRO_FORMAT_ARGB32));
- rb_define_const (rb_mCairo, "FORMAT_RGB24",
+ rb_define_const (rb_mCairo_Format, "RGB24",
INT2FIX (CAIRO_FORMAT_RGB24));
- rb_define_const (rb_mCairo, "FORMAT_A8",
+ rb_define_const (rb_mCairo_Format, "A8",
INT2FIX (CAIRO_FORMAT_A8));
- rb_define_const (rb_mCairo, "FORMAT_A1",
+ 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",
+ rb_define_const (rb_mCairo_Format, "RGB16_565",
INT2FIX (CAIRO_FORMAT_RGB16_565));
#endif
/* cairo_pattern_type_t */
- rb_define_const (rb_mCairo, "PATTERN_TYPE_SOLID",
+ rb_mCairo_PatternType = rb_define_module_under (rb_mCairo, "PatternType");
+ rb_define_const (rb_mCairo_PatternType, "SOLID",
INT2FIX (CAIRO_PATTERN_TYPE_SOLID));
- rb_define_const (rb_mCairo, "PATTERN_TYPE_SURFACE",
+ rb_define_const (rb_mCairo_PatternType, "SURFACE",
INT2FIX (CAIRO_PATTERN_TYPE_SURFACE));
- rb_define_const (rb_mCairo, "PATTERN_TYPE_LINEAR",
+ rb_define_const (rb_mCairo_PatternType, "LINEAR",
INT2FIX (CAIRO_PATTERN_TYPE_LINEAR));
- rb_define_const (rb_mCairo, "PATTERN_TYPE_RADIAL",
+ rb_define_const (rb_mCairo_PatternType, "RADIAL",
INT2FIX (CAIRO_PATTERN_TYPE_RADIAL));
/* cairo_extend_t */
- rb_define_const (rb_mCairo, "EXTEND_NONE",
+ rb_mCairo_Extend = rb_define_module_under (rb_mCairo, "Extend");
+ rb_define_const (rb_mCairo_Extend, "NONE",
INT2FIX (CAIRO_EXTEND_NONE));
- rb_define_const (rb_mCairo, "EXTEND_REPEAT",
+ rb_define_const (rb_mCairo_Extend, "REPEAT",
INT2FIX (CAIRO_EXTEND_REPEAT));
- rb_define_const (rb_mCairo, "EXTEND_REFLECT",
+ rb_define_const (rb_mCairo_Extend, "REFLECT",
INT2FIX (CAIRO_EXTEND_REFLECT));
- rb_define_const (rb_mCairo, "EXTEND_PAD",
+ rb_define_const (rb_mCairo_Extend, "PAD",
INT2FIX (CAIRO_EXTEND_PAD));
/* cairo_filter_t */
- rb_define_const (rb_mCairo, "FILTER_FAST",
+ rb_mCairo_Filter = rb_define_module_under (rb_mCairo, "Filter");
+ rb_define_const (rb_mCairo_Filter, "FAST",
INT2FIX (CAIRO_FILTER_FAST));
- rb_define_const (rb_mCairo, "FILTER_GOOD",
+ rb_define_const (rb_mCairo_Filter, "GOOD",
INT2FIX (CAIRO_FILTER_GOOD));
- rb_define_const (rb_mCairo, "FILTER_BEST",
+ rb_define_const (rb_mCairo_Filter, "BEST",
INT2FIX (CAIRO_FILTER_BEST));
- rb_define_const (rb_mCairo, "FILTER_NEAREST",
+ rb_define_const (rb_mCairo_Filter, "NEAREST",
INT2FIX (CAIRO_FILTER_NEAREST));
- rb_define_const (rb_mCairo, "FILTER_BILINEAR",
+ rb_define_const (rb_mCairo_Filter, "BILINEAR",
INT2FIX (CAIRO_FILTER_BILINEAR));
- rb_define_const (rb_mCairo, "FILTER_GAUSSIAN",
+ rb_define_const (rb_mCairo_Filter, "GAUSSIAN",
INT2FIX (CAIRO_FILTER_GAUSSIAN));
#if CAIRO_HAS_SVG_SURFACE
/* cairo_svg_version_t */
- rb_define_const (rb_mCairo, "SVG_VERSION_1_1",
+ rb_mCairo_SVGVersion = rb_define_module_under (rb_mCairo, "SVGVersion");
+ rb_define_const (rb_mCairo_SVGVersion, "VERSION_1_1",
INT2FIX (CAIRO_SVG_VERSION_1_1));
- rb_define_const (rb_mCairo, "SVG_VERSION_1_2",
+ rb_define_const (rb_mCairo_SVGVersion, "VERSION_1_2",
INT2FIX (CAIRO_SVG_VERSION_1_2));
#endif
}
Index: rb_cairo_font_face.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_font_face.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rb_cairo_font_face.c 3 May 2007 02:47:39 -0000 1.2
+++ rb_cairo_font_face.c 20 May 2007 02:45:40 -0000 1.3
@@ -50,7 +50,7 @@
static VALUE
cr_font_face_get_type (VALUE self)
{
- return INT2NUM ( cairo_font_face_get_type (_SELF));
+ return INT2NUM (cairo_font_face_get_type (_SELF));
}
Index: rb_cairo_surface.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_surface.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rb_cairo_surface.c 19 May 2007 00:25:42 -0000 1.6
+++ rb_cairo_surface.c 20 May 2007 02:45:40 -0000 1.7
@@ -940,11 +940,6 @@
/* SVG-surface */
INIT_SURFACE(svg, SVG)
- rb_define_const (rb_cCairo_SVGSurface, "VERSION_1_1",
- rb_const_get (rb_mCairo, rb_intern ("SVG_VERSION_1_1")));
- rb_define_const (rb_cCairo_SVGSurface, "VERSION_1_2",
- rb_const_get (rb_mCairo, rb_intern ("SVG_VERSION_1_2")));
-
rb_define_singleton_method (rb_cCairo_SVGSurface, "versions",
cr_svg_get_versions, 0);
rb_define_singleton_method (rb_cCairo_SVGSurface, "version_to_string",
More information about the cairo-commit
mailing list