comparison 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
comparison
equal deleted inserted replaced
575:97159102f886 576:5a68e2bcea17
24 24
25 sys.puts(path.stroke_width); 25 sys.puts(path.stroke_width);
26 path.stroke_width = 2; 26 path.stroke_width = 2;
27 sys.puts(path.stroke_width); 27 sys.puts(path.stroke_width);
28 28
29 var face = mb_rt.font_face_query("courier", 2, 100);
30 var blks = [[5, face, 20]];
31 var stext = mb_rt.stext_new("Hello", 100, 50);
32 stext.set_style(blks);
33 paint.fill(stext);
34 coord.add_shape(stext);
35
29 mb_rt.redraw_all(); 36 mb_rt.redraw_all();
30 37
31 var i = 0; 38 var i = 0;
32 setInterval(function() { 39 setInterval(function() {
33 var deg = (i++) * 0.1; 40 var deg = (i++) * 0.1;