APIdia Launch Partner
Top Inners Fields Constructors Methods
com.badlogic.gdx.tools.texturepacker

public Class TexturePacker

extends Object
Class Inheritance
Imports
java.io.File, .FileOutputStream, .FileReader, .IOException, .OutputStreamWriter, .Writer, java.util.Arrays, .HashSet, .Iterator, .Set, javax.imageio.IIOImage, .ImageIO, .ImageWriteParam, .ImageWriter, javax.imageio.stream.ImageOutputStream, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.graphics.Pixmap.Format, .Texture.TextureFilter, .Texture.TextureWrap, com.badlogic.gdx.graphics.g2d.TextureAtlas.TextureAtlasData, .TextureAtlas.TextureAtlasData.Region, com.badlogic.gdx.math.MathUtils, com.badlogic.gdx.utils.Array, .FloatArray, .GdxRuntimeException, .Json, .Null, java.awt.Color, .Graphics2D, .RenderingHints, java.awt.image.BufferedImage

Author
Nathan Sweet

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
pack-priv static class
public static interface
public static class
public abstract static class
public static class
public static enum
public static class

Field Summary

Modifier and TypeField and Description
private final ImageProcessor
private final Array<TexturePacker.InputImage>
private TexturePacker.Packer
private TexturePacker.ProgressListener
pack-priv String
private final TexturePacker.Settings

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addImage(File file)

public void
private static void
copy(BufferedImage src, int x, int y, int w, int h, BufferedImage dst, int dx, int dy, boolean rotated)

private int
private String
public String
public static boolean
isModified(String input, String output, String packFileName, TexturePacker.Settings settings)

Returns: true if the output file does not yet exist or its last modification date is before the last modification date of the input file

private static boolean
isModified(File file, long lastModified)

public static void
main(String[] args)

protected ImageProcessor
public void
pack(File outputDir, String packFileName)

private static void
plot(BufferedImage dst, int x, int y, int argb)

public static void
process(String input, String output, String packFileName)

Packs using defaults settings.

public static void
process(TexturePacker.Settings settings, String input, String output, String packFileName)

public static void
process(TexturePacker.Settings settings, String
Directory containing individual images to be packed.
input
,
String
Directory where the pack file and page images will be written.
output
,
String
The name of the pack file. Also used to name the page images.
packFileName
,
final TexturePacker.ProgressListener
May be null.
progress
)

public static boolean
processIfModified(String input, String output, String packFileName)

public static boolean
processIfModified(TexturePacker.Settings settings, String input, String output, String packFileName)

public void
public void
setProgressListener(TexturePacker.ProgressListener
May be null.
progressListener
)

public void
setRootDir(File
Used to strip the root directory prefix from image file names, can be null.
rootDir
)

private void
writeImages(File outputDir, String scaledPackFileName, Array<TexturePacker.Page> pages)

private void
writePackFile(File outputDir, String scaledPackFileName, Array<TexturePacker.Page> pages)

private void
writePage(OutputStreamWriter writer, boolean appending, TexturePacker.Page page)

private void
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait