Skip to content

Allocation

[Source]

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.

class val Allocation

Constructors

create

[Source]

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

Returns


Public fields

let x: USize val

[Source]


let y: USize val

[Source]


let width: USize val

[Source]


let height: USize val

[Source]


let slot_x: USize val

[Source]


let slot_y: USize val

[Source]


let slot_width: USize val

[Source]


let slot_height: USize val

[Source]