Stitcher.java 文件源码

java
阅读 14 收藏 0 点赞 0 评论 0

项目:Cauldron 作者:
public void doStitch()
{
    Stitcher.Holder[] aholder = (Stitcher.Holder[])this.setStitchHolders.toArray(new Stitcher.Holder[this.setStitchHolders.size()]);
    Arrays.sort(aholder);
    Stitcher.Holder[] aholder1 = aholder;
    int i = aholder.length;

    for (int j = 0; j < i; ++j)
    {
        Stitcher.Holder holder = aholder1[j];

        if (!this.allocateSlot(holder))
        {
            String s = String.format("Unable to fit: %s - size: %dx%d - Maybe try a lowerresolution resourcepack?", new Object[] {holder.getAtlasSprite().getIconName(), Integer.valueOf(holder.getAtlasSprite().getIconWidth()), Integer.valueOf(holder.getAtlasSprite().getIconHeight())});
            throw new StitcherException(holder, s);
        }
    }

    if (this.forcePowerOf2)
    {
        this.currentWidth = MathHelper.roundUpToPowerOfTwo(this.currentWidth);
        this.currentHeight = MathHelper.roundUpToPowerOfTwo(this.currentHeight);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号