List of usage examples for com.badlogic.gdx.tools.imagepacker TexturePackerFileProcessor TexturePackerFileProcessor
public TexturePackerFileProcessor(Settings defaultSettings, String packFileName)
From source file:pm.monkey.maven.plugins.texturepacker.PackMojo.java
License:Open Source License
public void execute() throws MojoExecutionException, MojoFailureException { Settings settings = new Settings(); settings.pot = this.pot; settings.paddingX = this.paddingX; settings.paddingY = this.paddingY; settings.edgePadding = this.edgePadding; settings.duplicatePadding = this.duplicatePadding; settings.rotation = this.rotation; settings.minWidth = this.minWidth; settings.minHeight = this.minHeight; settings.maxWidth = this.maxWidth; settings.maxHeight = this.maxHeight; settings.forceSquareOutput = this.forceSquareOutput; settings.stripWhitespaceX = this.stripWhitespaceX; settings.alphaThreshold = this.alphaThreshold; settings.filterMin = this.filterMin; settings.filterMag = this.filterMag; settings.wrapX = this.wrapX; settings.wrapY = this.wrapY; settings.format = this.format; settings.alias = this.alias; settings.outputFormat = this.outputFormat; settings.jpegQuality = this.jpegQuality; settings.ignoreBlankImages = this.ignoreBlankImages; settings.fast = this.fast; settings.debug = this.debug; settings.combineSubdirectories = this.combineSubdirectories; settings.flattenPaths = this.flattenPaths; settings.premultiplyAlpha = this.premultiplyAlpha; settings.useIndexes = this.useIndexes; settings.bleed = this.bleed; try {//from www. j a v a 2 s. c om TexturePackerFileProcessor processor = new TexturePackerFileProcessor(settings, this.packFileName); processor.process(this.inputDir, this.outputDir); } catch (Exception e) { buildContext.addMessage(this.inputDir, 0, 0, "Texture packing failed", BuildContext.SEVERITY_ERROR, e); throw new MojoFailureException("Texture packing failed", e); } finally { buildContext.refresh(this.outputDir); } }