Struct rect_packer::Packer [] [src]

pub struct Packer { /* fields omitted */ }

Packer is the main structure in this crate. It holds packing context.

Methods

impl Packer
[src]

[src]

Create new empty Packer with the provided parameters.

[src]

Get config that this packer was created with.

[src]

Pack new rectangle. Returns position of the 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.

[src]

Check if rectangle with the specified size can be added.

Trait Implementations

impl Clone for Packer
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more