comparison nodejs/shapes.cc @ 671:fc29a343ce7c

Track JS object with property store of objects
author Thinker K.F. Li <thinker@branda.to>
date Thu, 05 Aug 2010 17:43:33 +0800
parents a65720721c60
children c643af2095c5
comparison
equal deleted inserted replaced
670:f0b4fbcd1c51 671:fc29a343ce7c
143 rdman = xnjsmb_rt_rdman(rt); 143 rdman = xnjsmb_rt_rdman(rt);
144 sh = rdman_shape_path_new(rdman, dstr); 144 sh = rdman_shape_path_new(rdman, dstr);
145 145
146 WRAP(self, sh); 146 WRAP(self, sh);
147 SET(self, "mbrt", rt); 147 SET(self, "mbrt", rt);
148 mb_prop_set(&sh->obj.props, PROP_JSOBJ, *self);
148 149
149 return Null(); 150 return Null();
150 } 151 }
151 152
152 /*! \brief Initial function template for constructor of path objects. 153 /*! \brief Initial function template for constructor of path objects.
233 234
234 stext = rdman_shape_stext_new(rdman, data, x, y); 235 stext = rdman_shape_stext_new(rdman, data, x, y);
235 236
236 WRAP(self, stext); 237 WRAP(self, stext);
237 SET(self, "mbrt", rt); 238 SET(self, "mbrt", rt);
239 mb_prop_set(&stext->obj.props, PROP_JSOBJ, *self);
238 240
239 return Null(); 241 return Null();
240 } 242 }
241 243
242 static Persistent<FunctionTemplate> xnjsmb_shape_stext_temp; 244 static Persistent<FunctionTemplate> xnjsmb_shape_stext_temp;
368 rdman = xnjsmb_rt_rdman(rt); 370 rdman = xnjsmb_rt_rdman(rt);
369 img = rdman_shape_image_new(rdman, x, y, w, h); 371 img = rdman_shape_image_new(rdman, x, y, w, h);
370 372
371 WRAP(self, img); 373 WRAP(self, img);
372 SET(self, "mbrt", rt); 374 SET(self, "mbrt", rt);
375 mb_prop_set(&img->obj.props, PROP_JSOBJ, *self);
373 376
374 return Null(); 377 return Null();
375 } 378 }
376 379
377 static Persistent<FunctionTemplate> xnjsmb_shape_image_temp; 380 static Persistent<FunctionTemplate> xnjsmb_shape_image_temp;