Struct rect_packer::TightPacker [] [src]

pub struct TightPacker { /* fields omitted */ }

Similar to Packer but does not add any padding between rectangles.

Methods

impl TightPacker
[src]

Create new empty TightPacker with the provided parameters.

Pack new rectangle. Returns position of newly added rectangle. If there is not enough space returns None. If it returns None you can still try to add smaller rectangles.

allow_rotation - allow 90° rotation of the input rectangle. You can detect whether rectangle was rotated by comparing returned width and height with the supplied ones.

Check if rectangle with the specified size can be added.

Trait Implementations

impl Clone for TightPacker
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more