Allocation¶
Result of packing: a child's content placement and slot region within the container. Content (x, y, width, height) is where the child renders. Slot (slot_x, slot_y, slot_width, slot_height) is the full region the child claims — identical to content except for PackExpand, where the slot is larger and the content is centered within it.
Constructors¶
create¶
Create an allocation with content placement and slot region.
new val create(
x': USize val,
y': USize val,
width': USize val,
height': USize val,
slot_x': USize val,
slot_y': USize val,
slot_width': USize val,
slot_height': USize val)
: Allocation val^
Parameters¶
- x': USize val
- y': USize val
- width': USize val
- height': USize val
- slot_x': USize val
- slot_y': USize val
- slot_width': USize val
- slot_height': USize val
Returns¶
- Allocation val^