On Tue, 2008-07-15 at 14:28 +0200, Balázs Lájer wrote:
> Hi all,
> 
> I'm a bit new to clutter but for COGL fully. I tried to create a
> custom actor with another actor member. The problem is that I cannot
> position the member where I want, although when I get its coordinates,
> I get the right values.

you wrote:

 I set the position and called the clutter_actor_show() in the
 do_triangle_paint() function

which is wrong on a couple of issues: there's no need to call
clutter_actor_show() anymore, all actors are shown by default when
setting their parent, and surely you don't need to call
clutter_actor_show() inside a paint function. but, more importantly, you
don't say of which actor you're setting the position. your custom actor?
the label?

you should really read the API reference, in the section "Implementing a
new actor":

 
http://www.clutter-project.org/docs/clutter/stable/clutter-subclassing-ClutterActor.html

in short:

  - if you have children actors you should override the allocate virtual
    function and reposition the label depending on the allocation box
    that has been given to you by your parent actor

  - if you want to provide a preferred size for your actor, you should
    also override get_preferred_width() and get_preferred_height().

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, OpenedHand Ltd.
Unit R, Homesdale Business Centre
216-218 Homesdale Rd., Bromley - BR12QZ
http://www.o-hand.com

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to