Package com.badlogic.gdx.graphics.g2d

Examples of com.badlogic.gdx.graphics.g2d.PixmapPacker.pack()


        }

      }

      String name = packPrefix + c;
      Rectangle rect = packer.pack(name, pixmap);

      // determine which page it was packed into
      int pIndex = packer.getPageIndex(name);
      if (pIndex == -1) // we should not get here
        throw new IllegalStateException("packer was not able to insert '" + name + "' into a page");
View Full Code Here


    @Override
    public SpritePack loadSync(AssetManager manager, String fileName, SpritePackParameter parameter) {
        PixmapPacker pixmapPacker = new PixmapPacker(512, 512, Pixmap.Format.RGBA8888, 1, true);
        for(FileHandle file : files) {
            Pixmap pixmap = manager.get(file.path(), Pixmap.class);
            pixmapPacker.pack(file.nameWithoutExtension(), pixmap);
        }
        return new SpritePack(pixmapPacker.generateTextureAtlas(Texture.TextureFilter.Nearest,
                                                                Texture.TextureFilter.Nearest,
                                                                false));
    }
View Full Code Here

        }

      }

      String name = packPrefix + c;
      Rectangle rect = packer.pack(name, pixmap);

      // determine which page it was packed into
      int pIndex = packer.getPageIndex(name);
      if (pIndex == -1) // we should not get here
        throw new IllegalStateException("packer was not able to insert '" + name + "' into a page");
View Full Code Here

        }

      }

      String name = packPrefix + c;
      Rectangle rect = packer.pack(name, pixmap);

      // determine which page it was packed into
      int pIndex = packer.getPageIndex(name);
      if (pIndex == -1) // we should not get here
        throw new IllegalStateException("packer was not able to insert '" + name + "' into a page");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.