Example usage for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor TexturePackerFileProcessor

List of usage examples for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor TexturePackerFileProcessor

Introduction

In this page you can find the example usage for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor TexturePackerFileProcessor.

Prototype

public TexturePackerFileProcessor(Settings defaultSettings, String packFileName) 

Source Link

Usage

From source file:com.kotcrab.vis.editor.util.gdx.VisTexturePacker.java

License:Apache License

static public void process(TexturePacker.Settings settings, String input, String output, String packFileName,
        FilenameFilter filter) {// w  w w.j a  v  a  2  s .c o m
    try {
        TexturePackerFileProcessor processor = new TexturePackerFileProcessor(settings, packFileName);
        processor.setInputFilter(filter);
        // Sort input files by name to avoid platform-dependent atlas output changes.
        processor.setComparator((file1, file2) -> file1.getName().compareTo(file2.getName()));
        processor.process(new File(input), new File(output));
    } catch (Exception ex) {
        throw new RuntimeException("Error packing images.", ex);
    }
}