Subversion Repositories AndroidProjects

Rev

Blame | Last modification | View Log | RSS feed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jun 03 02:18:10 CEST 2012 -->
<TITLE>
PixmapPacker (libgdx API)
</TITLE>

<META NAME="date" CONTENT="2012-06-03">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="PixmapPacker (libgdx API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PixmapPacker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>

                                libgdx API
                                <style>
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
                                .TableHeadingColor { background:#EEEEFF; }
                                a { text-decoration:none }
                                a:hover { text-decoration:underline }
                                a:link, a:visited { color:blue }
                                table { border:0px }
                                .TableRowColor td:first-child { border-left:1px solid black }
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
                                hr { border:0px; border-bottom:1px solid #333366; }
                                </style>
                        </EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/ParticleEmitterBox2D.html" title="class in com.badlogic.gdx.graphics.g2d"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.ManagedPixmapTextureData.html" title="class in com.badlogic.gdx.graphics.g2d"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?com/badlogic/gdx/graphics/g2d/PixmapPacker.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="PixmapPacker.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
 if(window==top) {
   document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 }
 //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.badlogic.gdx.graphics.g2d</FONT>
<BR>
Class PixmapPacker</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.graphics.g2d.PixmapPacker</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>PixmapPacker</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></DL>
</PRE>

<P>
Packs <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><CODE>Pixmap</CODE></A> instances into one more more <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.Page.html" title="class in com.badlogic.gdx.graphics.g2d"><CODE>PixmapPacker.Page</CODE></A> instances to generate
 an atlas of Pixmap instances. Provides means to directly convert the pixmap atlas to a <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><CODE>TextureAtlas</CODE></A>. The
 packer supports padding and border pixel duplication, specified during construction. The packer supports incremental inserts
 and updates of TextureAtlases generated with this class.</p>
 
 All methods except <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getPage(java.lang.String)"><CODE>getPage(String)</CODE></A> and <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getPages()"><CODE>getPages()</CODE></A> are thread safe. The methods <CODE>#generateTextureAtlas(TextureFilter, TextureFilter)</CODE>
 and <CODE>#updateTextureAtlas(TextureAtlas, TextureFilter, TextureFilter)</CODE> need to be called on the rendering thread, all
 other methods can be called from any thread.</p>
 
 One-off usage:
 <pre>
 // 512x512 pixel pages, RGB565 format, 2 pixels of padding, border duplication
 PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, true);
 packer.pack("First Pixmap", pixmap1);
 packer.pack("Second Pixmap", pixmap2);
 TextureAtlas altas = packer.generateTextureAtlas(TextureFilter.Nearest, TextureFilter.Nearest);
 </pre>
 
 Note that you should not dispose the packer in this usage pattern. Instead, dispose the TextureAtlas
 if no longer needed.
 
 Incremental usage:
 <pre>
 // 512x512 pixel pages, RGB565 format, 2 pixels of padding, no border duplication
 PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, false);
 TextureAtlas incrementalAtlas = new TextureAtlas();
 
 // potentially on a separate thread, e.g. downloading thumbnails
 packer.pack("thumbnail", thumbnail);
 
 // on the rendering thread, every frame
 packer.updateTextureAtlas(incrementalAtlas, TextureFilter.Linear, TextureFilter.Linear);
 
 // once the atlas is no longer needed, make sure you get the final additions. This might
 // be more elaborate depending on your threading model.
 packer.updateTextureAtlas(incrementalAtlas, TextureFilter.Linear, TextureFilter.Linear);
 incrementalAtlas.dispose();
 </pre>
 
 Pixmap-only usage:
 <pre>
 PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, true);
 packer.pack("First Pixmap", pixmap1);
 packer.pack("Second Pixmap", pixmap2);
 
  // do something interesting with the resulting pages
  for(Page page: packer.getPages()) {
  }
 
  // dispose of the packer in this case
  packer.dispose();
 </pre>
<P>

<P>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.ManagedPixmapTextureData.html" title="class in com.badlogic.gdx.graphics.g2d">PixmapPacker.ManagedPixmapTextureData</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.Page.html" title="class in com.badlogic.gdx.graphics.g2d">PixmapPacker.Page</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#PixmapPacker(int, int, com.badlogic.gdx.graphics.Pixmap.Format, int, boolean)">PixmapPacker</A></B>(int&nbsp;width,
             int&nbsp;height,
             <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Format</A>&nbsp;format,
             int&nbsp;padding,
             boolean&nbsp;duplicateBorder)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Creates a new ImagePacker which will insert all supplied images into a <code>width</code> by <code>height</code> image.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#dispose()">dispose</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disposes all resources, including Pixmap instances for the pages
 created so far.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#duplicateBoarder()">duplicateBoarder</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#generateTextureAtlas(com.badlogic.gdx.graphics.Texture.TextureFilter, com.badlogic.gdx.graphics.Texture.TextureFilter, boolean)">generateTextureAtlas</A></B>(<A HREF="../../../../../com/badlogic/gdx/graphics/Texture.TextureFilter.html" title="enum in com.badlogic.gdx.graphics">Texture.TextureFilter</A>&nbsp;minFilter,
                     <A HREF="../../../../../com/badlogic/gdx/graphics/Texture.TextureFilter.html" title="enum in com.badlogic.gdx.graphics">Texture.TextureFilter</A>&nbsp;magFilter,
                     boolean&nbsp;useMipMaps)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates a new <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><CODE>TextureAtlas</CODE></A> from the <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><CODE>Pixmap</CODE></A> instances inserted so far.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getPadding()">getPadding</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.Page.html" title="class in com.badlogic.gdx.graphics.g2d">PixmapPacker.Page</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getPage(java.lang.String)">getPage</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getPageHeight()">getPageHeight</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array</A>&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.Page.html" title="class in com.badlogic.gdx.graphics.g2d">PixmapPacker.Page</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getPages()">getPages</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getPageWidth()">getPageWidth</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getRect(java.lang.String)">getRect</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#pack(java.lang.String, com.badlogic.gdx.graphics.Pixmap)">pack</A></B>(java.lang.String&nbsp;name,
     <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</A>&nbsp;image)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Inserts the given <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><CODE>Pixmap</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#updateTextureAtlas(com.badlogic.gdx.graphics.g2d.TextureAtlas, com.badlogic.gdx.graphics.Texture.TextureFilter, com.badlogic.gdx.graphics.Texture.TextureFilter, boolean)">updateTextureAtlas</A></B>(<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas</A>&nbsp;atlas,
                   <A HREF="../../../../../com/badlogic/gdx/graphics/Texture.TextureFilter.html" title="enum in com.badlogic.gdx.graphics">Texture.TextureFilter</A>&nbsp;minFilter,
                   <A HREF="../../../../../com/badlogic/gdx/graphics/Texture.TextureFilter.html" title="enum in com.badlogic.gdx.graphics">Texture.TextureFilter</A>&nbsp;magFilter,
                   boolean&nbsp;useMipMaps)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates the given <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><CODE>TextureAtlas</CODE></A>, adding any new <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><CODE>Pixmap</CODE></A> instances packed since the last
 call to this method.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="PixmapPacker(int, int, com.badlogic.gdx.graphics.Pixmap.Format, int, boolean)"><!-- --></A><H3>
PixmapPacker</H3>
<PRE>
public <B>PixmapPacker</B>(int&nbsp;width,
                    int&nbsp;height,
                    <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Format</A>&nbsp;format,
                    int&nbsp;padding,
                    boolean&nbsp;duplicateBorder)</PRE>
<DL>
<DD><p>
 Creates a new ImagePacker which will insert all supplied images into a <code>width</code> by <code>height</code> image.
 <code>padding</code> specifies the minimum number of pixels to insert between images. <code>border</code> will duplicate the
 border pixels of the inserted images to avoid seams when rendering with bi-linear filtering on.
 </p>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of the output image<DD><CODE>height</CODE> - the height of the output image<DD><CODE>padding</CODE> - the number of padding pixels<DD><CODE>duplicateBorder</CODE> - whether to duplicate the border</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="pack(java.lang.String, com.badlogic.gdx.graphics.Pixmap)"><!-- --></A><H3>
pack</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A> <B>pack</B>(java.lang.String&nbsp;name,
                      <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</A>&nbsp;image)</PRE>
<DL>
<DD><p>
 Inserts the given <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><CODE>Pixmap</CODE></A>. You can later on retrieve the images position in the output image via the supplied name and the
 method <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#getRect(java.lang.String)"><CODE>getRect(String)</CODE></A>.
 </p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the image<DD><CODE>image</CODE> - the image
<DT><B>Returns:</B><DD>Rectangle describing the area the pixmap was rendered to or null.
<DT><B>Throws:</B>
<DD><CODE>java.lang.RuntimeException</CODE> - in case the image did not fit due to the page size being to small or providing a duplicate name</DL>
</DD>
</DL>
<HR>

<A NAME="getPages()"><!-- --></A><H3>
getPages</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array</A>&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.Page.html" title="class in com.badlogic.gdx.graphics.g2d">PixmapPacker.Page</A>&gt; <B>getPages</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.Page.html" title="class in com.badlogic.gdx.graphics.g2d"><CODE>PixmapPacker.Page</CODE></A> instances created so far. This method is not thread safe!</DL>
</DD>
</DL>
<HR>

<A NAME="getRect(java.lang.String)"><!-- --></A><H3>
getRect</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math">Rectangle</A> <B>getRect</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the image
<DT><B>Returns:</B><DD>the rectangle for the image in the page it's stored in or null</DL>
</DD>
</DL>
<HR>

<A NAME="getPage(java.lang.String)"><!-- --></A><H3>
getPage</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.Page.html" title="class in com.badlogic.gdx.graphics.g2d">PixmapPacker.Page</A> <B>getPage</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the image
<DT><B>Returns:</B><DD>the page the image is stored in or null</DL>
</DD>
</DL>
<HR>

<A NAME="dispose()"><!-- --></A><H3>
dispose</H3>
<PRE>
public void <B>dispose</B>()</PRE>
<DL>
<DD>Disposes all resources, including Pixmap instances for the pages
 created so far. These page Pixmap instances are shared with
 any <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><CODE>TextureAtlas</CODE></A> generated or updated by either <CODE>#generateTextureAtlas(TextureFilter, TextureFilter)</CODE>
 or <CODE>#updateTextureAtlas(TextureAtlas, TextureFilter, TextureFilter)</CODE>. Do
 not call this method if you generated or updated a TextureAtlas, instead
 dispose the TextureAtlas.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html#dispose()">dispose</A></CODE> in interface <CODE><A HREF="../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="generateTextureAtlas(com.badlogic.gdx.graphics.Texture.TextureFilter, com.badlogic.gdx.graphics.Texture.TextureFilter, boolean)"><!-- --></A><H3>
generateTextureAtlas</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas</A> <B>generateTextureAtlas</B>(<A HREF="../../../../../com/badlogic/gdx/graphics/Texture.TextureFilter.html" title="enum in com.badlogic.gdx.graphics">Texture.TextureFilter</A>&nbsp;minFilter,
                                         <A HREF="../../../../../com/badlogic/gdx/graphics/Texture.TextureFilter.html" title="enum in com.badlogic.gdx.graphics">Texture.TextureFilter</A>&nbsp;magFilter,
                                         boolean&nbsp;useMipMaps)</PRE>
<DL>
<DD>Generates a new <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><CODE>TextureAtlas</CODE></A> from the <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><CODE>Pixmap</CODE></A> instances inserted so far.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>minFilter</CODE> - <DD><CODE>magFilter</CODE> -
<DT><B>Returns:</B><DD>the TextureAtlas</DL>
</DD>
</DL>
<HR>

<A NAME="updateTextureAtlas(com.badlogic.gdx.graphics.g2d.TextureAtlas, com.badlogic.gdx.graphics.Texture.TextureFilter, com.badlogic.gdx.graphics.Texture.TextureFilter, boolean)"><!-- --></A><H3>
updateTextureAtlas</H3>
<PRE>
public void <B>updateTextureAtlas</B>(<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas</A>&nbsp;atlas,
                               <A HREF="../../../../../com/badlogic/gdx/graphics/Texture.TextureFilter.html" title="enum in com.badlogic.gdx.graphics">Texture.TextureFilter</A>&nbsp;minFilter,
                               <A HREF="../../../../../com/badlogic/gdx/graphics/Texture.TextureFilter.html" title="enum in com.badlogic.gdx.graphics">Texture.TextureFilter</A>&nbsp;magFilter,
                               boolean&nbsp;useMipMaps)</PRE>
<DL>
<DD>Updates the given <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><CODE>TextureAtlas</CODE></A>, adding any new <A HREF="../../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><CODE>Pixmap</CODE></A> instances packed since the last
 call to this method. This can be used to insert Pixmap instances on a separate thread via <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.html#pack(java.lang.String, com.badlogic.gdx.graphics.Pixmap)"><CODE>pack(String, Pixmap)</CODE></A>
 and update the TextureAtlas on the rendering thread. This method must be called on the rendering thread.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getPageWidth()"><!-- --></A><H3>
getPageWidth</H3>
<PRE>
public int <B>getPageWidth</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getPageHeight()"><!-- --></A><H3>
getPageHeight</H3>
<PRE>
public int <B>getPageHeight</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getPadding()"><!-- --></A><H3>
getPadding</H3>
<PRE>
public int <B>getPadding</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="duplicateBoarder()"><!-- --></A><H3>
duplicateBoarder</H3>
<PRE>
public boolean <B>duplicateBoarder</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PixmapPacker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/ParticleEmitterBox2D.html" title="class in com.badlogic.gdx.graphics.g2d"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PixmapPacker.ManagedPixmapTextureData.html" title="class in com.badlogic.gdx.graphics.g2d"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?com/badlogic/gdx/graphics/g2d/PixmapPacker.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="PixmapPacker.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
 if(window==top) {
   document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 }
 //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

                                <div style="font-size:9pt"><i>
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
                                </i></div>
                       
</BODY>
</HTML>