allocate
Description:
Assigns the size of a Actor from the given box
.
This function should only be called on the children of an actor when overriding the allocate virtual function.
This function will adjust the stored allocation to take into account the alignment flags set in the x_align and y_align properties, as well as the margin values set in the margin_top, margin_right, margin_bottom, and margin_left properties.
This function will respect the easing state of the Actor and interpolate between the current allocation and the new one if the easing state duration is a positive value.
Actors can know from their allocation box whether they have moved with respect to their parent actor. The flags
parameter
describes additional information about the allocation, for instance whether the parent has moved with respect to the stage, for example because
a grandparent's origin has moved.
Parameters:
this |
A Actor |
box |
new allocation of the actor, in parent-relative coordinates |
flags |
flags that control the allocation |