Package arc.graphics.g2d
Class PixmapPacker.GuillotineStrategy
java.lang.Object
arc.graphics.g2d.PixmapPacker.GuillotineStrategy
- All Implemented Interfaces:
PixmapPacker.PackStrategy
- Enclosing class:
- PixmapPacker
public static class PixmapPacker.GuillotineStrategy
extends Object
implements PixmapPacker.PackStrategy
Does bin packing by inserting to the right or below previously packed rectangles. This is good at packing arbitrarily sized
images.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionpack
(PixmapPacker packer, String name, Rect rect) Returns the page the rectangle should be placed in and modifies the specified rectangle position.void
sort
(Seq<PixmapRegion> pixmaps)
-
Constructor Details
-
GuillotineStrategy
public GuillotineStrategy()
-
-
Method Details
-
sort
- Specified by:
sort
in interfacePixmapPacker.PackStrategy
-
pack
Description copied from interface:PixmapPacker.PackStrategy
Returns the page the rectangle should be placed in and modifies the specified rectangle position.- Specified by:
pack
in interfacePixmapPacker.PackStrategy
-