[cairo-commit] rcairo/src rb_cairo_context.c,1.25,1.26
Kouhei Sutou
commit at pdx.freedesktop.org
Sat Aug 16 00:23:18 PDT 2008
Committed by: kou
Update of /cvs/cairo/rcairo/src
In directory kemper:/tmp/cvs-serv29012/src
Modified Files:
rb_cairo_context.c
Log Message:
* src/rb_cairo_context.c: support Cairo::Context#have_show_text_glyphs?.
* test/test_context.rb (ContextTest#test_have_show_text_glyphs):
add a test for Cairo::Context#have_show_text_glyphs?.
Index: rb_cairo_context.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_context.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- rb_cairo_context.c 11 Aug 2008 12:53:33 -0000 1.25
+++ rb_cairo_context.c 16 Aug 2008 07:23:15 -0000 1.26
@@ -1171,6 +1171,14 @@
return self;
}
+#if CAIRO_CHECK_VERSION(1, 7, 2)
+static VALUE
+cr_has_show_text_glyphs (VALUE self)
+{
+ return CBOOL2RVAL (cairo_has_show_text_glyphs (_SELF));
+}
+#endif
+
static VALUE
cr_get_font_face (VALUE self)
{
@@ -1580,6 +1588,12 @@
#endif
rb_define_method (rb_cCairo_Context, "show_text", cr_show_text, 1);
rb_define_method (rb_cCairo_Context, "show_glyphs", cr_show_glyphs, 1);
+#if CAIRO_CHECK_VERSION(1, 7, 2)
+ rb_define_method (rb_cCairo_Context, "have_show_text_glyphs?",
+ cr_has_show_text_glyphs, 0);
+ rb_define_alias (rb_cCairo_Context,
+ "has_show_text_glyphs?", "have_show_text_glyphs?");
+#endif
rb_define_method (rb_cCairo_Context, "text_path", cr_text_path, 1);
rb_define_method (rb_cCairo_Context, "glyph_path", cr_glyph_path, 1);
rb_define_method (rb_cCairo_Context, "text_extents", cr_text_extents, 1);
More information about the cairo-commit
mailing list