[cairo-commit] rcairo/src rb_cairo_path.c,1.5,1.6
Kouhei Sutou
commit at pdx.freedesktop.org
Wed May 2 20:04:01 PDT 2007
- Previous message: [cairo-commit] rcairo/src rb_cairo_constants.c, 1.2,
1.3 rb_cairo_context.c, 1.9, 1.10 rb_cairo_font_extents.c, 1.2,
1.3 rb_cairo_font_face.c, 1.1, 1.2 rb_cairo_font_options.c,
1.1, 1.2 rb_cairo_glyph.c, 1.2, 1.3 rb_cairo_matrix.c, 1.1,
1.2 rb_cairo_path.c, 1.4, 1.5 rb_cairo_pattern.c, 1.6,
1.7 rb_cairo_private.c, 1.2, 1.3 rb_cairo_private.h, 1.2,
1.3 rb_cairo_scaled_font.c, 1.1, 1.2 rb_cairo_surface.c, 1.3,
1.4 rb_cairo_text_extents.c, 1.1, 1.2
- Next message: [cairo-commit] rcairo ChangeLog,1.147,1.148
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: kou
Update of /cvs/cairo/rcairo/src
In directory kemper:/tmp/cvs-serv13505/src
Modified Files:
rb_cairo_path.c
Log Message:
* src/rb_cairo_path.c
(Cairo::PathData#move_to?, Cairo::PathData#line_to?,
Cairo::PathData#curve_to?, Cairo::PathData#close_path?): added.
Index: rb_cairo_path.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_path.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rb_cairo_path.c 3 May 2007 02:47:39 -0000 1.5
+++ rb_cairo_path.c 3 May 2007 03:03:47 -0000 1.6
@@ -45,6 +45,34 @@
}
static VALUE
+cr_path_data_move_to_p (VALUE self)
+{
+ return CBOOL2RVAL (RVAL2CRPATHDATATYPE (rb_ivar_get (self, id_type)) ==
+ CAIRO_PATH_MOVE_TO);
+}
+
+static VALUE
+cr_path_data_line_to_p (VALUE self)
+{
+ return CBOOL2RVAL (RVAL2CRPATHDATATYPE (rb_ivar_get (self, id_type)) ==
+ CAIRO_PATH_LINE_TO);
+}
+
+static VALUE
+cr_path_data_curve_to_p (VALUE self)
+{
+ return CBOOL2RVAL (RVAL2CRPATHDATATYPE (rb_ivar_get (self, id_type)) ==
+ CAIRO_PATH_CURVE_TO);
+}
+
+static VALUE
+cr_path_data_close_path_p (VALUE self)
+{
+ return CBOOL2RVAL (RVAL2CRPATHDATATYPE (rb_ivar_get (self, id_type)) ==
+ CAIRO_PATH_CLOSE_PATH);
+}
+
+static VALUE
cr_path_data_each (VALUE self)
{
return rb_ary_each (rb_ivar_get (self, id_points));
@@ -227,6 +255,13 @@
rb_define_method (rb_cCairo_PathData, "initialize",
cr_path_data_initialize, 2);
+ rb_define_method (rb_cCairo_PathData, "move_to?", cr_path_data_move_to_p, 0);
+ rb_define_method (rb_cCairo_PathData, "line_to?", cr_path_data_line_to_p, 0);
+ rb_define_method (rb_cCairo_PathData, "curve_to?",
+ cr_path_data_curve_to_p, 0);
+ rb_define_method (rb_cCairo_PathData, "close_path?",
+ cr_path_data_close_path_p, 0);
+
rb_define_method (rb_cCairo_PathData, "each", cr_path_data_each, 0);
rb_define_method (rb_cCairo_PathData, "to_a", cr_path_data_to_a, 0);
- Previous message: [cairo-commit] rcairo/src rb_cairo_constants.c, 1.2,
1.3 rb_cairo_context.c, 1.9, 1.10 rb_cairo_font_extents.c, 1.2,
1.3 rb_cairo_font_face.c, 1.1, 1.2 rb_cairo_font_options.c,
1.1, 1.2 rb_cairo_glyph.c, 1.2, 1.3 rb_cairo_matrix.c, 1.1,
1.2 rb_cairo_path.c, 1.4, 1.5 rb_cairo_pattern.c, 1.6,
1.7 rb_cairo_private.c, 1.2, 1.3 rb_cairo_private.h, 1.2,
1.3 rb_cairo_scaled_font.c, 1.1, 1.2 rb_cairo_surface.c, 1.3,
1.4 rb_cairo_text_extents.c, 1.1, 1.2
- Next message: [cairo-commit] rcairo ChangeLog,1.147,1.148
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list