[cairo-commit] rcairo/test test_context.rb,1.3,1.4
Kouhei Sutou
commit at pdx.freedesktop.org
Sat Aug 16 01:34:21 PDT 2008
- Previous message: [cairo-commit] rcairo/src rb_cairo_context.c, 1.26, 1.27 rb_cairo_private.c, 1.7, 1.8 rb_cairo_private.h, 1.10, 1.11 rb_cairo_scaled_font.c, 1.6, 1.7
- Next message: [cairo-commit] rcairo ChangeLog,1.294,1.295
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: kou
Update of /cvs/cairo/rcairo/test
In directory kemper:/tmp/cvs-serv1768/test
Modified Files:
test_context.rb
Log Message:
* src/rb_cairo_private.[ch] (rb_cairo__text_clusters_from_ruby_object)
(rb_cairo__glyphs_from_ruby_object): add.
* test/test_context.rb (ContextTest#test_text_to_glyphs): add a
test for Cairo::Context#show_text_glyphs.
* src/rb_cairo_context.c: support Cairo::Context#show_text_glyphs.
Index: test_context.rb
===================================================================
RCS file: /cvs/cairo/rcairo/test/test_context.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- test_context.rb 16 Aug 2008 07:23:16 -0000 1.3
+++ test_context.rb 16 Aug 2008 08:34:19 -0000 1.4
@@ -58,4 +58,22 @@
context = Cairo::Context.new(image_surface)
assert_false(context.have_show_text_glyphs?)
end
+
+
+ def test_text_to_glyphs
+ only_cairo_version(1, 7, 2)
+
+ surface = Cairo::PDFSurface.new(StringIO.new, 10, 10)
+ context = Cairo::Context.new(surface)
+ scaled_font = Cairo::ScaledFont.new(context.font_face,
+ Cairo::Matrix.identity,
+ Cairo::Matrix.identity,
+ Cairo::FontOptions.new)
+
+ utf8 = "text"
+ glyphs, clusters, backward = scaled_font.text_to_glyphs(0, 0, utf8)
+ assert_nothing_raised do
+ context.show_text_glyphs(utf8, glyphs, clusters, backward)
+ end
+ end
end
- Previous message: [cairo-commit] rcairo/src rb_cairo_context.c, 1.26, 1.27 rb_cairo_private.c, 1.7, 1.8 rb_cairo_private.h, 1.10, 1.11 rb_cairo_scaled_font.c, 1.6, 1.7
- Next message: [cairo-commit] rcairo ChangeLog,1.294,1.295
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list