comparison nodejs/shapes.cc @ 885:2b492008ce26 abs_n_rel_center

Told redraw manager that a text is dirty when change its text at JS
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 26 Sep 2010 00:54:12 +0800
parents 586e50f82c1f
children df6ee4568ca2
comparison
equal deleted inserted replaced
884:6c8e4e1f3a39 885:2b492008ce26
66 count++; 66 count++;
67 if(count > 10000) { 67 if(count > 10000) {
68 V8::LowMemoryNotification(); 68 V8::LowMemoryNotification();
69 count = 0; 69 count = 0;
70 } 70 }
71 }
72
73 static void
74 xnjsmb_sh_stext_set_text(shape_t *sh, Handle<Object> self,
75 const char *txt) {
76 Handle<Object> rt;
77 redraw_man_t *rdman;
78
79 sh_stext_set_text(sh, txt);
80
81 /*
82 * Mark changed.
83 */
84 rt = GET(self, "mbrt")->ToObject();
85 ASSERT(rt != NULL);
86 rdman = xnjsmb_rt_rdman(rt);
87
88 if(sh_get_coord(sh))
89 rdman_shape_changed(rdman, sh);
71 } 90 }
72 91
73 /*! \brief Set style blocks for a stext object from JS. 92 /*! \brief Set style blocks for a stext object from JS.
74 * 93 *
75 * A style block is style setting of a chip of text. It is a 3-tuple, 94 * A style block is style setting of a chip of text. It is a 3-tuple,