public class Stitcher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Stitcher.Holder |
static class |
Stitcher.Slot |
Modifier and Type | Field and Description |
---|---|
private int |
currentHeight |
private int |
currentWidth |
private boolean |
forcePowerOf2 |
private int |
maxHeight |
private int |
maxTileDimension
Max size (width or height) of a single tile
|
private int |
maxWidth |
private int |
mipmapLevelStitcher |
private java.util.Set<Stitcher.Holder> |
setStitchHolders |
private java.util.List<Stitcher.Slot> |
stitchSlots |
Constructor and Description |
---|
Stitcher(int maxTextureWidth,
int maxTextureHeight,
boolean p_i45095_3_,
int p_i45095_4_,
int mipmapLevel) |
Modifier and Type | Method and Description |
---|---|
void |
addSprite(TextureAtlasSprite p_110934_1_) |
private boolean |
allocateSlot(Stitcher.Holder p_94310_1_)
Attempts to find space for specified tile
|
void |
doStitch() |
private boolean |
expandAndAllocateSlot(Stitcher.Holder p_94311_1_)
Expand stitched texture in order to make space for specified tile
|
int |
getCurrentHeight() |
int |
getCurrentWidth() |
private static int |
getMipmapDimension(int p_147969_0_,
int p_147969_1_) |
java.util.List<TextureAtlasSprite> |
getStichSlots() |
private final int mipmapLevelStitcher
private final java.util.Set<Stitcher.Holder> setStitchHolders
private final java.util.List<Stitcher.Slot> stitchSlots
private int currentWidth
private int currentHeight
private final int maxWidth
private final int maxHeight
private final boolean forcePowerOf2
private final int maxTileDimension
public Stitcher(int maxTextureWidth, int maxTextureHeight, boolean p_i45095_3_, int p_i45095_4_, int mipmapLevel)
public int getCurrentWidth()
public int getCurrentHeight()
public void addSprite(TextureAtlasSprite p_110934_1_)
public void doStitch()
public java.util.List<TextureAtlasSprite> getStichSlots()
private static int getMipmapDimension(int p_147969_0_, int p_147969_1_)
private boolean allocateSlot(Stitcher.Holder p_94310_1_)
private boolean expandAndAllocateSlot(Stitcher.Holder p_94311_1_)