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>
TextureAtlas (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="TextureAtlas (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/TextureAtlas.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/SpriteCache.html" title="class in com.badlogic.gdx.graphics.g2d"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.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/TextureAtlas.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TextureAtlas.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 TextureAtlas</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.graphics.g2d.TextureAtlas</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>TextureAtlas</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>
Loads images from texture atlases created by TexturePacker.<br>
 <br>
 A TextureAtlas must be disposed to free up the resources consumed by the backing textures.
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>Nathan Sweet</DD>
</DL>
<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>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Describes the region of a packed image and provides information about the original image before it was packed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasSprite.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasSprite</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A sprite that, if whitespace was stripped from the region when it was packed, is automatically positioned as if whitespace
 had not been stripped.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.TextureAtlasData.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.TextureAtlasData</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/TextureAtlas.html#TextureAtlas()">TextureAtlas</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an empty atlas to which regions can be added.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#TextureAtlas(com.badlogic.gdx.files.FileHandle)">TextureAtlas</A></B>(<A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;packFile)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads the specified pack file, using the parent directory of the pack file to find the page images.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#TextureAtlas(com.badlogic.gdx.files.FileHandle, boolean)">TextureAtlas</A></B>(<A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;packFile,
             boolean&nbsp;flip)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#TextureAtlas(com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.files.FileHandle)">TextureAtlas</A></B>(<A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;packFile,
             <A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;imagesDir)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#TextureAtlas(com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.files.FileHandle, boolean)">TextureAtlas</A></B>(<A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;packFile,
             <A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;imagesDir,
             boolean&nbsp;flip)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#TextureAtlas(java.lang.String)">TextureAtlas</A></B>(java.lang.String&nbsp;internalPackFile)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads the specified pack file using <A HREF="../../../../../com/badlogic/gdx/Files.FileType.html#Internal"><CODE>Files.FileType.Internal</CODE></A>, using the parent directory of the pack file to find the page
 images.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#TextureAtlas(com.badlogic.gdx.graphics.g2d.TextureAtlas.TextureAtlasData)">TextureAtlas</A></B>(<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.TextureAtlasData.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.TextureAtlasData</A>&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#addRegion(java.lang.String, com.badlogic.gdx.graphics.Texture, int, int, int, int)">addRegion</A></B>(java.lang.String&nbsp;name,
          <A HREF="../../../../../com/badlogic/gdx/graphics/Texture.html" title="class in com.badlogic.gdx.graphics">Texture</A>&nbsp;texture,
          int&nbsp;x,
          int&nbsp;y,
          int&nbsp;width,
          int&nbsp;height)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a region to the atlas.</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.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#addRegion(java.lang.String, com.badlogic.gdx.graphics.g2d.TextureRegion)">addRegion</A></B>(java.lang.String&nbsp;name,
          <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureRegion</A>&nbsp;textureRegion)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a region to the atlas.</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/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#createSprite(java.lang.String)">createSprite</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first region found with the specified name as a sprite.</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/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#createSprite(java.lang.String, int)">createSprite</A></B>(java.lang.String&nbsp;name,
             int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first region found with the specified name and index as a sprite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#createSprites()">createSprites</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all regions in the atlas as sprites.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#createSprites(java.lang.String)">createSprites</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all regions with the specified name as sprites, ordered by smallest to largest <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html#index"><CODE>index</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/TextureAtlas.html#dispose()">dispose</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases all resources associated with this TextureAtlas instance.</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.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#findRegion(java.lang.String)">findRegion</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first region found with the specified name.</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.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#findRegion(java.lang.String, int)">findRegion</A></B>(java.lang.String&nbsp;name,
           int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first region found with the specified name and index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#findRegions(java.lang.String)">findRegions</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all regions with the specified name, ordered by smallest to largest <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html#index"><CODE>index</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#getRegions()">getRegions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all regions in the atlas.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Set&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/Texture.html" title="class in com.badlogic.gdx.graphics">Texture</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#getTextures()">getTextures</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="TextureAtlas()"><!-- --></A><H3>
TextureAtlas</H3>
<PRE>
public <B>TextureAtlas</B>()</PRE>
<DL>
<DD>Creates an empty atlas to which regions can be added.
<P>
</DL>
<HR>

<A NAME="TextureAtlas(java.lang.String)"><!-- --></A><H3>
TextureAtlas</H3>
<PRE>
public <B>TextureAtlas</B>(java.lang.String&nbsp;internalPackFile)</PRE>
<DL>
<DD>Loads the specified pack file using <A HREF="../../../../../com/badlogic/gdx/Files.FileType.html#Internal"><CODE>Files.FileType.Internal</CODE></A>, using the parent directory of the pack file to find the page
 images.
<P>
</DL>
<HR>

<A NAME="TextureAtlas(com.badlogic.gdx.files.FileHandle)"><!-- --></A><H3>
TextureAtlas</H3>
<PRE>
public <B>TextureAtlas</B>(<A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;packFile)</PRE>
<DL>
<DD>Loads the specified pack file, using the parent directory of the pack file to find the page images.
<P>
</DL>
<HR>

<A NAME="TextureAtlas(com.badlogic.gdx.files.FileHandle, boolean)"><!-- --></A><H3>
TextureAtlas</H3>
<PRE>
public <B>TextureAtlas</B>(<A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;packFile,
                    boolean&nbsp;flip)</PRE>
<DL>
<DL>
<DT><B>Parameters:</B><DD><CODE>flip</CODE> - If true, all regions loaded will be flipped for use with a perspective where 0,0 is the upper left corner.<DT><B>See Also:</B><DD><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#TextureAtlas(com.badlogic.gdx.files.FileHandle)"><CODE>TextureAtlas(FileHandle)</CODE></A></DL>
</DL>
<HR>

<A NAME="TextureAtlas(com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.files.FileHandle)"><!-- --></A><H3>
TextureAtlas</H3>
<PRE>
public <B>TextureAtlas</B>(<A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;packFile,
                    <A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;imagesDir)</PRE>
<DL>
</DL>
<HR>

<A NAME="TextureAtlas(com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.files.FileHandle, boolean)"><!-- --></A><H3>
TextureAtlas</H3>
<PRE>
public <B>TextureAtlas</B>(<A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;packFile,
                    <A HREF="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;imagesDir,
                    boolean&nbsp;flip)</PRE>
<DL>
<DL>
<DT><B>Parameters:</B><DD><CODE>flip</CODE> - If true, all regions loaded will be flipped for use with a perspective where 0,0 is the upper left corner.</DL>
</DL>
<HR>

<A NAME="TextureAtlas(com.badlogic.gdx.graphics.g2d.TextureAtlas.TextureAtlasData)"><!-- --></A><H3>
TextureAtlas</H3>
<PRE>
public <B>TextureAtlas</B>(<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.TextureAtlasData.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.TextureAtlasData</A>&nbsp;data)</PRE>
<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="addRegion(java.lang.String, com.badlogic.gdx.graphics.Texture, int, int, int, int)"><!-- --></A><H3>
addRegion</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A> <B>addRegion</B>(java.lang.String&nbsp;name,
                                          <A HREF="../../../../../com/badlogic/gdx/graphics/Texture.html" title="class in com.badlogic.gdx.graphics">Texture</A>&nbsp;texture,
                                          int&nbsp;x,
                                          int&nbsp;y,
                                          int&nbsp;width,
                                          int&nbsp;height)</PRE>
<DL>
<DD>Adds a region to the atlas. The specified texture will be disposed when the atlas is disposed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="addRegion(java.lang.String, com.badlogic.gdx.graphics.g2d.TextureRegion)"><!-- --></A><H3>
addRegion</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A> <B>addRegion</B>(java.lang.String&nbsp;name,
                                          <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureRegion</A>&nbsp;textureRegion)</PRE>
<DL>
<DD>Adds a region to the atlas. The texture for the specified region will be disposed when the atlas is disposed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getRegions()"><!-- --></A><H3>
getRegions</H3>
<PRE>
public java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A>&gt; <B>getRegions</B>()</PRE>
<DL>
<DD>Returns all regions in the atlas.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="findRegion(java.lang.String)"><!-- --></A><H3>
findRegion</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A> <B>findRegion</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns the first region found with the specified name. This method uses string comparison to find the region, so the result
 should be cached rather than calling this method multiple times.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The region, or null.</DL>
</DD>
</DL>
<HR>

<A NAME="findRegion(java.lang.String, int)"><!-- --></A><H3>
findRegion</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A> <B>findRegion</B>(java.lang.String&nbsp;name,
                                           int&nbsp;index)</PRE>
<DL>
<DD>Returns the first region found with the specified name and index. This method uses string comparison to find the region, so
 the result should be cached rather than calling this method multiple times.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The region, or null.</DL>
</DD>
</DL>
<HR>

<A NAME="findRegions(java.lang.String)"><!-- --></A><H3>
findRegions</H3>
<PRE>
public java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas.AtlasRegion</A>&gt; <B>findRegions</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns all regions with the specified name, ordered by smallest to largest <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html#index"><CODE>index</CODE></A>. This method
 uses string comparison to find the regions, so the result should be cached rather than calling this method multiple times.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="createSprites()"><!-- --></A><H3>
createSprites</H3>
<PRE>
public java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite</A>&gt; <B>createSprites</B>()</PRE>
<DL>
<DD>Returns all regions in the atlas as sprites. This method creates a new sprite for each region, so the result should be
 stored rather than calling this method multiple times.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#createSprite(java.lang.String)"><CODE>createSprite(String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="createSprite(java.lang.String)"><!-- --></A><H3>
createSprite</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite</A> <B>createSprite</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns the first region found with the specified name as a sprite. If whitespace was stripped from the region when it was
 packed, the sprite is automatically positioned as if whitespace had not been stripped. This method uses string comparison to
 find the region and constructs a new sprite, so the result should be cached rather than calling this method multiple times.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The sprite, or null.</DL>
</DD>
</DL>
<HR>

<A NAME="createSprite(java.lang.String, int)"><!-- --></A><H3>
createSprite</H3>
<PRE>
public <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite</A> <B>createSprite</B>(java.lang.String&nbsp;name,
                           int&nbsp;index)</PRE>
<DL>
<DD>Returns the first region found with the specified name and index as a sprite. This method uses string comparison to find the
 region and constructs a new sprite, so the result should be cached rather than calling this method multiple times.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The sprite, or null.<DT><B>See Also:</B><DD><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#createSprite(java.lang.String)"><CODE>createSprite(String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="createSprites(java.lang.String)"><!-- --></A><H3>
createSprites</H3>
<PRE>
public java.util.List&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite</A>&gt; <B>createSprites</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns all regions with the specified name as sprites, ordered by smallest to largest <A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html#index"><CODE>index</CODE></A>. This
 method uses string comparison to find the regions and constructs new sprites, so the result should be cached rather than
 calling this method multiple times.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html#createSprite(java.lang.String)"><CODE>createSprite(String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getTextures()"><!-- --></A><H3>
getTextures</H3>
<PRE>
public java.util.Set&lt;<A HREF="../../../../../com/badlogic/gdx/graphics/Texture.html" title="class in com.badlogic.gdx.graphics">Texture</A>&gt; <B>getTextures</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the textures of the pages, unordered</DL>
</DD>
</DL>
<HR>

<A NAME="dispose()"><!-- --></A><H3>
dispose</H3>
<PRE>
public void <B>dispose</B>()</PRE>
<DL>
<DD>Releases all resources associated with this TextureAtlas instance. This releases all the textures backing all TextureRegions
 and Sprites, which should no longer be used after calling dispose.
<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>
<!-- ========= 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/TextureAtlas.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/SpriteCache.html" title="class in com.badlogic.gdx.graphics.g2d"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.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/TextureAtlas.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TextureAtlas.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>