Java Code Examples for com.badlogic.gdx.graphics.g2d.PixmapPacker.Page

The following examples show how to use com.badlogic.gdx.graphics.g2d.PixmapPacker.Page. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: gdx-smart-font   Source File: BitmapFontWriter.java    License: MIT License 5 votes vote down vote up
/** A convenience method to write pixmaps by page; typically returned from a PixmapPacker when used alongside
 * FreeTypeFontGenerator.
 * 
 * @param pages the pages containing the Pixmaps
 * @param outputDir the output directory
 * @param fileName the file name
 * @return the file refs */
public static String[] writePixmaps (Array<Page> pages, FileHandle outputDir, String fileName) {
	Pixmap[] pix = new Pixmap[pages.size];
	for (int i=0; i<pages.size; i++) {
		pix[i] = pages.get(i).getPixmap();
	}
	return writePixmaps(pix, outputDir, fileName);
}
 
Example 2
Source Project: Cubes   Source File: BitmapFontWriter.java    License: MIT License 5 votes vote down vote up
/** A convenience method to write pixmaps by page; typically returned from a PixmapPacker when used alongside
 * FreeTypeFontGenerator.
 *
 * @param pages the pages containing the Pixmaps
 * @param outputDir the output directory
 * @param fileName the file name
 * @return the file refs */
public static String[] writePixmaps (Array<Page> pages, FileHandle outputDir, String fileName) {
  Pixmap[] pix = new Pixmap[pages.size];
  for (int i = 0; i < pages.size; i++) {
    pix[i] = pages.get(i).getPixmap();
  }
  return writePixmaps(pix, outputDir, fileName);
}
 
Example 3
Source Project: gdx-proto   Source File: BitmapFontWriter.java    License: Apache License 2.0 5 votes vote down vote up
/** A convenience method to write pixmaps by page; typically returned from a PixmapPacker when used alongside
 * FreeTypeFontGenerator.
 * 
 * @param pages the pages containing the Pixmaps
 * @param outputDir the output directory
 * @param fileName the file name
 * @return the file refs */
public static String[] writePixmaps (Array<Page> pages, FileHandle outputDir, String fileName) {
	Pixmap[] pix = new Pixmap[pages.size];
	for (int i=0; i<pages.size; i++) {
		pix[i] = pages.get(i).getPixmap();
	}
	return writePixmaps(pix, outputDir, fileName);
}