pack

Packs rects into a rectangular region with size width by height, using method. Accounts for padding grid-spaces of padding on all sides of the rects. The data in rects will be re-ordered.

nothrow @nogc
R[]
pack
(
R
)
(
scope return ref R[] rects
,
uint width
,
uint height
,,
uint padding = 0
)
if ()

Return Value

Type: R[]

A slice of rects, containing only the rectangles that could fit into the packing region.

Meta