Struct rect_packer::DensePacker [] [src]

pub struct DensePacker { /* fields omitted */ }

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

Methods

impl DensePacker
[src]

[src]

Create new empty DensePacker with the provided parameters.

[src]

Get size that this packer was created with.

[src]

Set new size for this packer.

New size should be not less than the current size.

[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 DensePacker
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more