Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ChevyRay/crunch-rs
/ functions
Functions
28 in github.com/ChevyRay/crunch-rs
⨍
Functions
28
◇
Types & classes
8
↓ 6 callers
Method
bottom
(&self)
src/rect.rs:63
↓ 6 callers
Method
right
(&self)
src/rect.rs:57
↓ 3 callers
Method
push
(&mut self, item: Item<T>)
src/packer.rs:119
↓ 2 callers
Method
better_than
(&self, other: &Score)
src/packer.rs:351
↓ 2 callers
Method
clear
(&mut self)
src/packer.rs:113
↓ 2 callers
Method
find_best_node
(&self, w: usize, h: usize, node_index: usize)
src/packer.rs:132
↓ 2 callers
Method
pack
Attempt to pack all the items into `into_rect`. The returned `Vec<(Rect, T)>` will contain positions for all packed items on success, or just the item
src/packer.rs:218
↓ 2 callers
Method
sort_priority
(&self)
src/item.rs:44
↓ 1 callers
Method
area
(&self)
src/rect.rs:27
↓ 1 callers
Method
contains
(&self, other: &Rect)
src/rect.rs:33
↓ 1 callers
Method
extend
(&mut self, items: I)
src/packer.rs:125
↓ 1 callers
Method
leaf_contains_rect
(&self, rect: &Rect, node_index: usize)
src/packer.rs:161
↓ 1 callers
Method
overlaps
(&self, other: &Rect)
src/rect.rs:42
↓ 1 callers
Function
pack_into_po2
Attempts to pack the supplied items into the smallest power of 2 container it possibly can, while not exceeding the provided `max_size`. On success,
src/packer.rs:60
↓ 1 callers
Method
pack_into_po2
Attempts to pack the supplied items into the smallest power of 2 container it possibly can while not exceeding the provided `max_size`. On success, r
src/packer.rs:291
↓ 1 callers
Method
split
(&self, rect: &Rect)
src/rect.rs:68
↓ 1 callers
Method
split_tree
(&mut self, rect: &Rect, node_index: usize)
src/packer.rs:177
↓ 1 callers
Method
top_left
(&self)
src/rect.rs:51
Method
default
Default packer, equivalent to `Packer::new()`.
src/packer.rs:107
Function
main
()
examples/pack_images/src/main.rs:5
Method
new
(x: usize, y: usize, w: usize, h: usize)
src/rect.rs:13
Method
new
Create a new, empty packer.
src/packer.rs:78
Method
new
(data: T, w: usize, h: usize, rot: Rotation)
src/item.rs:39
Method
of_size
(w: usize, h: usize)
src/rect.rs:21
Function
pack
Attempts to tightly pack the supplied `items` into `into_rect`. Returns a collection of `Vec<(Rect, T)>` on success, or all items that were packed be
src/packer.rs:47
Method
with_capacity
Create a packer with an initial `capacity` to prevent collection resizing.
src/packer.rs:87
Method
with_items
Create a packer initialized with the collection of `items`.
src/packer.rs:96
Method
worst
()
src/packer.rs:342