Java 类com.badlogic.gdx.tools.imagepacker.TexturePacker2 实例源码

项目:GdxStudio    文件:ToolBar.java   
void initPack(){
    JButton packButton = Style.createMenuButton("Pack");
    packButton.setIcon(Icon.icon("epackage"));
    packButton.addActionListener(new ActionListener(){
        @Override
        public void actionPerformed(ActionEvent arg0) {
            Settings settings = new Settings();
            settings.maxWidth = 2048;
            settings.maxHeight = 2048;
            settings.paddingX = 0;
            settings.paddingY = 0;
            TexturePacker2.process(settings, Content.getProject()+File.separator+"pack",
                    Content.getProject()+"atlas/", "pack.atlas");
            for(File f: new File(Content.getProject()+File.separator+"pack").listFiles()){
                if(f.isDirectory()){
                    TexturePacker2.process(settings, f.getPath(), Content.getProject()+"atlas/", f.getName());
                    JOptionPane.showMessageDialog(null, "Packed Texture: "+f.getName(), "Texture Packer", 
                            JOptionPane.INFORMATION_MESSAGE);
                }
            }
        }
    });
    add(packButton);
}
项目:GoingUnder    文件:DesktopRunner.java   
private static void createAtlasWidgets() {
    Settings settings = new Settings();
    settings.minHeight = 512;
    settings.minWidth = 512;
    settings.maxHeight = 512;
    settings.maxWidth = 512;
    settings.paddingY = 2;
    settings.paddingX = 2;
    settings.wrapY = TextureWrap.Repeat;
    TexturePacker2.process(settings, 
            //"D:\\gamepictures\\widgets\\",
            "D:\\gamepictures\\widgets\\redjavolak",                
            "D:/MySelf/Android/Workspace/HgRepo/GoingUnder/assets/atlases", "widgets");
}
项目:GoingUnder    文件:DesktopRunner.java   
private static void createAtlas() {
    Settings settings = new Settings();
    settings.minHeight = 512;
    settings.minWidth = 512;
    settings.maxHeight = 512;
    settings.maxWidth = 512;
    settings.paddingY = 2;
    settings.paddingX = 2;
    settings.wrapY = TextureWrap.Repeat;
    TexturePacker2.process(settings, 
            "D:\\gamepictures\\2\\",
            "D:/MySelf/Android/Workspace/HgRepo/GoingUnder/assets/atlases", "game");
}
项目:Droha-Beta    文件:PackTextures.java   
public static void main(String[] args) {
        Settings settings = new Settings();
        settings.filterMin = TextureFilter.Linear;
        settings.filterMag = TextureFilter.Linear;
        TexturePacker2.process(settings, "../dev-images", "../Droha-android/assets/data", "empaquetado");
        System.out.println("Empaquetado Completo!");
}
项目:SwapShip    文件:DesktopLauncher.java   
private static void packImages() {
    TexturePacker2.process("../images/game", "../android/assets/game", "gameImages");
    TexturePacker2.process("../images/ui", "../android/assets/ui", "uiskin");
}
项目:super-run    文件:TextureSetup.java   
public static void main(String[] args) {
    TexturePacker2.process("C:\\Users\\Eson\\Desktop\\Android\\workspace\\super-run-android\\assets\\data", "C:\\Users\\Eson\\Desktop\\Android\\workspace\\super-run-android\\assets\\data\\textures", "textures.pack");
}