On 2012-05-14 at 13:50, Emmanuele Bassi wrote: > On 2012-05-14 at 13:38, Lionel Landwerlin wrote: > > On Mon, 2012-05-14 at 22:30 +1000, Amy C wrote: > > > > /* create a clone of the rectangle */ > > > let clone = new Clutter.Clone(rect); > > > > replace previous line by : > > > > let clone = new Clutter.Clone({ source: rect }); > > > > > clone.set_position(100,100); > > > Stage.add_actor( clone ); > > > clone.show(); // this runs without error, but I do not see any second > > > rectangle! > > a Clone has no implicit size, so it'll use the preferred size of the > source; a Rectangle has not implicit size, so its preferred size is 0x0. > in short, you have to give the Clone a size as well.
ugh, right - we use the Actor get_preferred_* wrappers, so it's going to hit the cache/explicitly set size. which is another trap of the Clone class, in case you wish to clone an actor and use its preferred size instead of the one explicitly set. ciao, Emmanuele. -- Emmanuele Bassi, Intel Open Source Technology Center _______________________________________________ clutter-app-devel-list mailing list clutter-app-devel-list@clutter-project.org http://lists.clutter-project.org/listinfo/clutter-app-devel-list