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

项目: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");
}
项目:GdxStudio    文件:TexturePackerFileProcessor.java   
public TexturePackerFileProcessor (Settings defaultSettings, String packFileName) {
    this.defaultSettings = defaultSettings;

    if (packFileName.indexOf('.') == -1) packFileName += ".atlas";
    this.packFileName = packFileName;

    setFlattenOutput(true);
    addInputSuffix(".png", ".jpg");
}
项目:GdxStudio    文件:ImageProcessor.java   
/** @param rootDir Can be null. */
public ImageProcessor (File rootDir, Settings settings) {
    this.settings = settings;

    if (rootDir != null) {
        rootPath = rootDir.getAbsolutePath().replace('\\', '/');
        if (!rootPath.endsWith("/")) rootPath += "/";
    }
}
项目: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!");
}
项目:touhou-java    文件:TexturePackerFileProcessor.java   
public TexturePackerFileProcessor (Settings defaultSettings, String packFileName) {
    this.defaultSettings = defaultSettings;

    if (packFileName.indexOf('.') == -1) packFileName += ".atlas";
    this.packFileName = packFileName;

    setFlattenOutput(true);
    addInputSuffix(".png", ".jpg");
}
项目:GdxStudio    文件:MaxRectsPacker.java   
public MaxRectsPacker (Settings settings) {
    this.settings = settings;
    if (settings.minWidth > settings.maxWidth) throw new RuntimeException("Page min width cannot be higher than max width.");
    if (settings.minHeight > settings.maxHeight)
        throw new RuntimeException("Page min height cannot be higher than max height.");
}
项目:GdxStudio    文件:TexturePackerFileProcessor.java   
public TexturePackerFileProcessor () {
    this(new Settings(), "pack.atlas");
}
项目:GdxStudio    文件:ImageProcessor.java   
public ImageProcessor (Settings settings) {
    this(null, settings);
}
项目:touhou-java    文件:MaxRectsPacker.java   
public MaxRectsPacker (Settings settings) {
    this.settings = settings;
    if (settings.minWidth > settings.maxWidth) throw new RuntimeException("Page min width cannot be higher than max width.");
    if (settings.minHeight > settings.maxHeight)
        throw new RuntimeException("Page min height cannot be higher than max height.");
}
项目:touhou-java    文件:TexturePackerFileProcessor.java   
public TexturePackerFileProcessor () {
    this(new Settings(), "pack.atlas");
}
项目:touhou-java    文件:ImageProcessor.java   
public ImageProcessor (File rootDir, Settings settings) {
    this.settings = settings;

    rootPath = rootDir.getAbsolutePath().replace('\\', '/');
    if (!rootPath.endsWith("/")) rootPath += "/";
}