diff nodejs/testcase.js @ 576:5a68e2bcea17

Set font styles for stext in Javascript
author Thinker K.F. Li <thinker@branda.to>
date Fri, 11 Jun 2010 01:21:10 +0800
parents a2faee809514
children d45c928f6523
line wrap: on
line diff
--- a/nodejs/testcase.js	Thu Jun 10 09:36:41 2010 +0800
+++ b/nodejs/testcase.js	Fri Jun 11 01:21:10 2010 +0800
@@ -26,6 +26,13 @@
 path.stroke_width = 2;
 sys.puts(path.stroke_width);
 
+var face = mb_rt.font_face_query("courier", 2, 100);
+var blks = [[5, face, 20]];
+var stext = mb_rt.stext_new("Hello", 100, 50);
+stext.set_style(blks);
+paint.fill(stext);
+coord.add_shape(stext);
+
 mb_rt.redraw_all();
 
 var i = 0;