summaryrefslogtreecommitdiff
path: root/packer/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'packer/src/lib.rs')
-rw-r--r--packer/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/packer/src/lib.rs b/packer/src/lib.rs
index 06c66ae..328f90e 100644
--- a/packer/src/lib.rs
+++ b/packer/src/lib.rs
@@ -1,5 +1,6 @@
+use std::collections::HashMap;
+use std::ops::Deref;
use std::sync::Arc;
-use std::{collections::HashMap, ops::Deref};
use exun::RawUnexpected;
use image::{GenericImage, RgbImage};
@@ -92,6 +93,7 @@ impl RectanglePacker {
let mut rectangles = Vec::with_capacity(self.textures.len());
self.textures.sort();
+ self.textures.reverse();
for texture in &self.textures {
// loop to the next row if we've gone off the edge
if (x_position + texture.0.width()) > image_width {