opsu-dance/lib/slick/javadoc/org/newdawn/slick/Animation.html
2014-06-29 22:17:04 -04:00

1310 lines
46 KiB
HTML

<!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_34) on Mon Jun 03 22:20:30 BST 2013 -->
<TITLE>
Animation (Slick - The 2D Library)
</TITLE>
<META NAME="date" CONTENT="2013-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="Animation (Slick - The 2D Library)";
}
}
</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/Animation.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/newdawn/slick/AngelCodeFont.html" title="class in org.newdawn.slick"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/newdawn/slick/AppGameContainer.html" title="class in org.newdawn.slick"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/newdawn/slick/Animation.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Animation.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;NESTED&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">
org.newdawn.slick</FONT>
<BR>
Class Animation</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.newdawn.slick.Animation</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../org/newdawn/slick/Renderable.html" title="interface in org.newdawn.slick">Renderable</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>Animation</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../org/newdawn/slick/Renderable.html" title="interface in org.newdawn.slick">Renderable</A></DL>
</PRE>
<P>
A utility to hold and render animations
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>kevin, DeX (speed updates)</DD>
</DL>
<HR>
<P>
<!-- ======== 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="../../../org/newdawn/slick/Animation.html#Animation()">Animation</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create an empty animation</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#Animation(boolean)">Animation</A></B>(boolean&nbsp;autoUpdate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create an empty animation</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#Animation(org.newdawn.slick.Image[], int)">Animation</A></B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>[]&nbsp;frames,
int&nbsp;duration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new animation from a set of images</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#Animation(org.newdawn.slick.Image[], int[])">Animation</A></B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>[]&nbsp;frames,
int[]&nbsp;durations)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new animation from a set of images</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#Animation(org.newdawn.slick.Image[], int[], boolean)">Animation</A></B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>[]&nbsp;frames,
int[]&nbsp;durations,
boolean&nbsp;autoUpdate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new animation from a set of images</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#Animation(org.newdawn.slick.Image[], int, boolean)">Animation</A></B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>[]&nbsp;frames,
int&nbsp;duration,
boolean&nbsp;autoUpdate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new animation from a set of images</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#Animation(org.newdawn.slick.SpriteSheet, int)">Animation</A></B>(<A HREF="../../../org/newdawn/slick/SpriteSheet.html" title="class in org.newdawn.slick">SpriteSheet</A>&nbsp;frames,
int&nbsp;duration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new animation based on the sprite from a sheet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#Animation(org.newdawn.slick.SpriteSheet, int[], int[])">Animation</A></B>(<A HREF="../../../org/newdawn/slick/SpriteSheet.html" title="class in org.newdawn.slick">SpriteSheet</A>&nbsp;ss,
int[]&nbsp;frames,
int[]&nbsp;duration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new Animation where each frame is a sub-image of <tt>SpriteSheet</tt> ss.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#Animation(org.newdawn.slick.SpriteSheet, int, int, int, int, boolean, int, boolean)">Animation</A></B>(<A HREF="../../../org/newdawn/slick/SpriteSheet.html" title="class in org.newdawn.slick">SpriteSheet</A>&nbsp;frames,
int&nbsp;x1,
int&nbsp;y1,
int&nbsp;x2,
int&nbsp;y2,
boolean&nbsp;horizontalScan,
int&nbsp;duration,
boolean&nbsp;autoUpdate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new animation based on a selection of sprites from a sheet</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="../../../org/newdawn/slick/Animation.html#addFrame(org.newdawn.slick.Image, int)">addFrame</A></B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>&nbsp;frame,
int&nbsp;duration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add animation frame to the animation</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="../../../org/newdawn/slick/Animation.html#addFrame(int, int, int)">addFrame</A></B>(int&nbsp;duration,
int&nbsp;x,
int&nbsp;y)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add animation frame to the animation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/newdawn/slick/Animation.html" title="class in org.newdawn.slick">Animation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#copy()">copy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a copy of this animation.</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="../../../org/newdawn/slick/Animation.html#draw()">draw</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw the animation to the screen</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="../../../org/newdawn/slick/Animation.html#draw(float, float)">draw</A></B>(float&nbsp;x,
float&nbsp;y)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw the animation at a specific location</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="../../../org/newdawn/slick/Animation.html#draw(float, float, org.newdawn.slick.Color)">draw</A></B>(float&nbsp;x,
float&nbsp;y,
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A>&nbsp;filter)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw the animation at a specific location</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="../../../org/newdawn/slick/Animation.html#draw(float, float, float, float)">draw</A></B>(float&nbsp;x,
float&nbsp;y,
float&nbsp;width,
float&nbsp;height)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw the animation</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="../../../org/newdawn/slick/Animation.html#draw(float, float, float, float, org.newdawn.slick.Color)">draw</A></B>(float&nbsp;x,
float&nbsp;y,
float&nbsp;width,
float&nbsp;height,
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A>&nbsp;col)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw the animation</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="../../../org/newdawn/slick/Animation.html#drawFlash(float, float, float, float)">drawFlash</A></B>(float&nbsp;x,
float&nbsp;y,
float&nbsp;width,
float&nbsp;height)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw the animation</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="../../../org/newdawn/slick/Animation.html#drawFlash(float, float, float, float, org.newdawn.slick.Color)">drawFlash</A></B>(float&nbsp;x,
float&nbsp;y,
float&nbsp;width,
float&nbsp;height,
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A>&nbsp;col)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw the animation</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#getCurrentFrame()">getCurrentFrame</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the image associated with the current animation frame</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="../../../org/newdawn/slick/Animation.html#getDuration(int)">getDuration</A></B>(int&nbsp;index)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the duration of a particular frame</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="../../../org/newdawn/slick/Animation.html#getDurations()">getDurations</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the durations of all the frames in this animation</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="../../../org/newdawn/slick/Animation.html#getFrame()">getFrame</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the index of the current frame</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="../../../org/newdawn/slick/Animation.html#getFrameCount()">getFrameCount</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the number of frames that are in the animation</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="../../../org/newdawn/slick/Animation.html#getHeight()">getHeight</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the height of the current frame</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#getImage(int)">getImage</A></B>(int&nbsp;index)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the image assocaited with a given frame index</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#getSpeed()">getSpeed</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current speed of the animation.</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="../../../org/newdawn/slick/Animation.html#getWidth()">getWidth</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the width of the current frame</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="../../../org/newdawn/slick/Animation.html#isStopped()">isStopped</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check if this animation has stopped (either explictly or because it's reached its target frame)</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="../../../org/newdawn/slick/Animation.html#renderInUse(int, int)">renderInUse</A></B>(int&nbsp;x,
int&nbsp;y)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Render the appropriate frame when the spriteSheet backing this Animation is in use.</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="../../../org/newdawn/slick/Animation.html#restart()">restart</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Restart the animation from the beginning</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="../../../org/newdawn/slick/Animation.html#setAutoUpdate(boolean)">setAutoUpdate</A></B>(boolean&nbsp;auto)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicate if this animation should automatically update based on the
time between renders or if it should need updating via the update()
method.</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="../../../org/newdawn/slick/Animation.html#setCurrentFrame(int)">setCurrentFrame</A></B>(int&nbsp;index)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the current frame to be rendered</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="../../../org/newdawn/slick/Animation.html#setDuration(int, int)">setDuration</A></B>(int&nbsp;index,
int&nbsp;duration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the duration of the given frame</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="../../../org/newdawn/slick/Animation.html#setLooping(boolean)">setLooping</A></B>(boolean&nbsp;loop)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicate if this animation should loop or stop at the last frame</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="../../../org/newdawn/slick/Animation.html#setPingPong(boolean)">setPingPong</A></B>(boolean&nbsp;pingPong)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicate if this animation should ping pong back and forth</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="../../../org/newdawn/slick/Animation.html#setSpeed(float)">setSpeed</A></B>(float&nbsp;spd)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adjust the overall speed of the animation.</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="../../../org/newdawn/slick/Animation.html#start()">start</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start the animation playing again</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="../../../org/newdawn/slick/Animation.html#stop()">stop</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stop the animation</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="../../../org/newdawn/slick/Animation.html#stopAt(int)">stopAt</A></B>(int&nbsp;frameIndex)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicate the animation should stop when it reaches the specified
frame index (note, not frame number but index in the animation</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#toString()">toString</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/newdawn/slick/Animation.html#update(long)">update</A></B>(long&nbsp;delta)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update the animation, note that this will have odd effects if auto update
is also turned on</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="../../../org/newdawn/slick/Animation.html#updateNoDraw()">updateNoDraw</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I></I>&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, 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="Animation()"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>()</PRE>
<DL>
<DD>Create an empty animation
<P>
</DL>
<HR>
<A NAME="Animation(org.newdawn.slick.Image[], int)"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>[]&nbsp;frames,
int&nbsp;duration)</PRE>
<DL>
<DD>Create a new animation from a set of images
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>frames</CODE> - The images for the animation frames<DD><CODE>duration</CODE> - The duration to show each frame</DL>
</DL>
<HR>
<A NAME="Animation(org.newdawn.slick.Image[], int[])"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>[]&nbsp;frames,
int[]&nbsp;durations)</PRE>
<DL>
<DD>Create a new animation from a set of images
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>frames</CODE> - The images for the animation frames<DD><CODE>durations</CODE> - The duration to show each frame</DL>
</DL>
<HR>
<A NAME="Animation(boolean)"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>(boolean&nbsp;autoUpdate)</PRE>
<DL>
<DD>Create an empty animation
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>autoUpdate</CODE> - True if this animation should automatically update. This means that the
current frame will be caculated based on the time between renders</DL>
</DL>
<HR>
<A NAME="Animation(org.newdawn.slick.Image[], int, boolean)"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>[]&nbsp;frames,
int&nbsp;duration,
boolean&nbsp;autoUpdate)</PRE>
<DL>
<DD>Create a new animation from a set of images
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>frames</CODE> - The images for the animation frames<DD><CODE>duration</CODE> - The duration to show each frame<DD><CODE>autoUpdate</CODE> - True if this animation should automatically update. This means that the
current frame will be caculated based on the time between renders</DL>
</DL>
<HR>
<A NAME="Animation(org.newdawn.slick.Image[], int[], boolean)"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>[]&nbsp;frames,
int[]&nbsp;durations,
boolean&nbsp;autoUpdate)</PRE>
<DL>
<DD>Create a new animation from a set of images
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>frames</CODE> - The images for the animation frames<DD><CODE>durations</CODE> - The duration to show each frame<DD><CODE>autoUpdate</CODE> - True if this animation should automatically update. This means that the
current frame will be caculated based on the time between renders</DL>
</DL>
<HR>
<A NAME="Animation(org.newdawn.slick.SpriteSheet, int)"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>(<A HREF="../../../org/newdawn/slick/SpriteSheet.html" title="class in org.newdawn.slick">SpriteSheet</A>&nbsp;frames,
int&nbsp;duration)</PRE>
<DL>
<DD>Create a new animation based on the sprite from a sheet. It assumed that
the sprites are organised on horizontal scan lines and that every sprite
in the sheet should be used.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>frames</CODE> - The sprite sheet containing the frames<DD><CODE>duration</CODE> - The duration each frame should be displayed for</DL>
</DL>
<HR>
<A NAME="Animation(org.newdawn.slick.SpriteSheet, int, int, int, int, boolean, int, boolean)"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>(<A HREF="../../../org/newdawn/slick/SpriteSheet.html" title="class in org.newdawn.slick">SpriteSheet</A>&nbsp;frames,
int&nbsp;x1,
int&nbsp;y1,
int&nbsp;x2,
int&nbsp;y2,
boolean&nbsp;horizontalScan,
int&nbsp;duration,
boolean&nbsp;autoUpdate)</PRE>
<DL>
<DD>Create a new animation based on a selection of sprites from a sheet
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>frames</CODE> - The sprite sheet containing the frames<DD><CODE>x1</CODE> - The x coordinate of the first sprite from the sheet to appear in the animation<DD><CODE>y1</CODE> - The y coordinate of the first sprite from the sheet to appear in the animation<DD><CODE>x2</CODE> - The x coordinate of the last sprite from the sheet to appear in the animation<DD><CODE>y2</CODE> - The y coordinate of the last sprite from the sheet to appear in the animation<DD><CODE>horizontalScan</CODE> - True if the sprites are arranged in hoizontal scan lines. Otherwise
vertical is assumed<DD><CODE>duration</CODE> - The duration each frame should be displayed for<DD><CODE>autoUpdate</CODE> - True if this animation should automatically update based on the render times</DL>
</DL>
<HR>
<A NAME="Animation(org.newdawn.slick.SpriteSheet, int[], int[])"><!-- --></A><H3>
Animation</H3>
<PRE>
public <B>Animation</B>(<A HREF="../../../org/newdawn/slick/SpriteSheet.html" title="class in org.newdawn.slick">SpriteSheet</A>&nbsp;ss,
int[]&nbsp;frames,
int[]&nbsp;duration)</PRE>
<DL>
<DD>Creates a new Animation where each frame is a sub-image of <tt>SpriteSheet</tt> ss.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>ss</CODE> - The <tt>SpriteSheet</tt> backing this animation<DD><CODE>frames</CODE> - An array of coordinates of sub-image locations for each frame<DD><CODE>duration</CODE> - The duration each frame should be displayed for</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="addFrame(int, int, int)"><!-- --></A><H3>
addFrame</H3>
<PRE>
public void <B>addFrame</B>(int&nbsp;duration,
int&nbsp;x,
int&nbsp;y)</PRE>
<DL>
<DD>Add animation frame to the animation.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - The duration to display the frame for<DD><CODE>x</CODE> - The x location of the frame on the <tt>SpriteSheet</tt><DD><CODE>y</CODE> - The y location of the frame on the <tt>spriteSheet</tt></DL>
</DD>
</DL>
<HR>
<A NAME="setAutoUpdate(boolean)"><!-- --></A><H3>
setAutoUpdate</H3>
<PRE>
public void <B>setAutoUpdate</B>(boolean&nbsp;auto)</PRE>
<DL>
<DD>Indicate if this animation should automatically update based on the
time between renders or if it should need updating via the update()
method.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>auto</CODE> - True if this animation should automatically update</DL>
</DD>
</DL>
<HR>
<A NAME="setPingPong(boolean)"><!-- --></A><H3>
setPingPong</H3>
<PRE>
public void <B>setPingPong</B>(boolean&nbsp;pingPong)</PRE>
<DL>
<DD>Indicate if this animation should ping pong back and forth
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pingPong</CODE> - True if the animation should ping pong</DL>
</DD>
</DL>
<HR>
<A NAME="isStopped()"><!-- --></A><H3>
isStopped</H3>
<PRE>
public boolean <B>isStopped</B>()</PRE>
<DL>
<DD>Check if this animation has stopped (either explictly or because it's reached its target frame)
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>True if the animation has stopped<DT><B>See Also:</B><DD><A HREF="../../../org/newdawn/slick/Animation.html#stopAt"><CODE>stopAt</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setSpeed(float)"><!-- --></A><H3>
setSpeed</H3>
<PRE>
public void <B>setSpeed</B>(float&nbsp;spd)</PRE>
<DL>
<DD>Adjust the overall speed of the animation.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>spd</CODE> - The speed to run the animation. Default: 1.0</DL>
</DD>
</DL>
<HR>
<A NAME="getSpeed()"><!-- --></A><H3>
getSpeed</H3>
<PRE>
public float <B>getSpeed</B>()</PRE>
<DL>
<DD>Returns the current speed of the animation.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The speed this animation is being played back at</DL>
</DD>
</DL>
<HR>
<A NAME="stop()"><!-- --></A><H3>
stop</H3>
<PRE>
public void <B>stop</B>()</PRE>
<DL>
<DD>Stop the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="start()"><!-- --></A><H3>
start</H3>
<PRE>
public void <B>start</B>()</PRE>
<DL>
<DD>Start the animation playing again
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="restart()"><!-- --></A><H3>
restart</H3>
<PRE>
public void <B>restart</B>()</PRE>
<DL>
<DD>Restart the animation from the beginning
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addFrame(org.newdawn.slick.Image, int)"><!-- --></A><H3>
addFrame</H3>
<PRE>
public void <B>addFrame</B>(<A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A>&nbsp;frame,
int&nbsp;duration)</PRE>
<DL>
<DD>Add animation frame to the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>frame</CODE> - The image to display for the frame<DD><CODE>duration</CODE> - The duration to display the frame for</DL>
</DD>
</DL>
<HR>
<A NAME="draw()"><!-- --></A><H3>
draw</H3>
<PRE>
public void <B>draw</B>()</PRE>
<DL>
<DD>Draw the animation to the screen
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="draw(float, float)"><!-- --></A><H3>
draw</H3>
<PRE>
public void <B>draw</B>(float&nbsp;x,
float&nbsp;y)</PRE>
<DL>
<DD>Draw the animation at a specific location
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/newdawn/slick/Renderable.html#draw(float, float)">draw</A></CODE> in interface <CODE><A HREF="../../../org/newdawn/slick/Renderable.html" title="interface in org.newdawn.slick">Renderable</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x position to draw the animation at<DD><CODE>y</CODE> - The y position to draw the animation at</DL>
</DD>
</DL>
<HR>
<A NAME="draw(float, float, org.newdawn.slick.Color)"><!-- --></A><H3>
draw</H3>
<PRE>
public void <B>draw</B>(float&nbsp;x,
float&nbsp;y,
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A>&nbsp;filter)</PRE>
<DL>
<DD>Draw the animation at a specific location
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x position to draw the animation at<DD><CODE>y</CODE> - The y position to draw the animation at<DD><CODE>filter</CODE> - The filter to apply</DL>
</DD>
</DL>
<HR>
<A NAME="draw(float, float, float, float)"><!-- --></A><H3>
draw</H3>
<PRE>
public void <B>draw</B>(float&nbsp;x,
float&nbsp;y,
float&nbsp;width,
float&nbsp;height)</PRE>
<DL>
<DD>Draw the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x position to draw the animation at<DD><CODE>y</CODE> - The y position to draw the animation at<DD><CODE>width</CODE> - The width to draw the animation at<DD><CODE>height</CODE> - The height to draw the animation at</DL>
</DD>
</DL>
<HR>
<A NAME="draw(float, float, float, float, org.newdawn.slick.Color)"><!-- --></A><H3>
draw</H3>
<PRE>
public void <B>draw</B>(float&nbsp;x,
float&nbsp;y,
float&nbsp;width,
float&nbsp;height,
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A>&nbsp;col)</PRE>
<DL>
<DD>Draw the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x position to draw the animation at<DD><CODE>y</CODE> - The y position to draw the animation at<DD><CODE>width</CODE> - The width to draw the animation at<DD><CODE>height</CODE> - The height to draw the animation at<DD><CODE>col</CODE> - The colour filter to use</DL>
</DD>
</DL>
<HR>
<A NAME="renderInUse(int, int)"><!-- --></A><H3>
renderInUse</H3>
<PRE>
public void <B>renderInUse</B>(int&nbsp;x,
int&nbsp;y)</PRE>
<DL>
<DD>Render the appropriate frame when the spriteSheet backing this Animation is in use.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x position to draw the animation at<DD><CODE>y</CODE> - The y position to draw the animation at</DL>
</DD>
</DL>
<HR>
<A NAME="getWidth()"><!-- --></A><H3>
getWidth</H3>
<PRE>
public int <B>getWidth</B>()</PRE>
<DL>
<DD>Get the width of the current frame
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The width of the current frame</DL>
</DD>
</DL>
<HR>
<A NAME="getHeight()"><!-- --></A><H3>
getHeight</H3>
<PRE>
public int <B>getHeight</B>()</PRE>
<DL>
<DD>Get the height of the current frame
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The height of the current frame</DL>
</DD>
</DL>
<HR>
<A NAME="drawFlash(float, float, float, float)"><!-- --></A><H3>
drawFlash</H3>
<PRE>
public void <B>drawFlash</B>(float&nbsp;x,
float&nbsp;y,
float&nbsp;width,
float&nbsp;height)</PRE>
<DL>
<DD>Draw the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x position to draw the animation at<DD><CODE>y</CODE> - The y position to draw the animation at<DD><CODE>width</CODE> - The width to draw the animation at<DD><CODE>height</CODE> - The height to draw the animation at</DL>
</DD>
</DL>
<HR>
<A NAME="drawFlash(float, float, float, float, org.newdawn.slick.Color)"><!-- --></A><H3>
drawFlash</H3>
<PRE>
public void <B>drawFlash</B>(float&nbsp;x,
float&nbsp;y,
float&nbsp;width,
float&nbsp;height,
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A>&nbsp;col)</PRE>
<DL>
<DD>Draw the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x position to draw the animation at<DD><CODE>y</CODE> - The y position to draw the animation at<DD><CODE>width</CODE> - The width to draw the animation at<DD><CODE>height</CODE> - The height to draw the animation at<DD><CODE>col</CODE> - The colour for the flash</DL>
</DD>
</DL>
<HR>
<A NAME="updateNoDraw()"><!-- --></A><H3>
updateNoDraw</H3>
<PRE>
public void <B>updateNoDraw</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I></I>
<P>
<DD>Update the animation cycle without draw the image, useful
for keeping two animations in sync
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="update(long)"><!-- --></A><H3>
update</H3>
<PRE>
public void <B>update</B>(long&nbsp;delta)</PRE>
<DL>
<DD>Update the animation, note that this will have odd effects if auto update
is also turned on
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>delta</CODE> - The amount of time thats passed since last update<DT><B>See Also:</B><DD><A HREF="../../../org/newdawn/slick/Animation.html#autoUpdate"><CODE>autoUpdate</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFrame()"><!-- --></A><H3>
getFrame</H3>
<PRE>
public int <B>getFrame</B>()</PRE>
<DL>
<DD>Get the index of the current frame
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The index of the current frame</DL>
</DD>
</DL>
<HR>
<A NAME="setCurrentFrame(int)"><!-- --></A><H3>
setCurrentFrame</H3>
<PRE>
public void <B>setCurrentFrame</B>(int&nbsp;index)</PRE>
<DL>
<DD>Set the current frame to be rendered
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The index of the frame to rendered</DL>
</DD>
</DL>
<HR>
<A NAME="getImage(int)"><!-- --></A><H3>
getImage</H3>
<PRE>
public <A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A> <B>getImage</B>(int&nbsp;index)</PRE>
<DL>
<DD>Get the image assocaited with a given frame index
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The index of the frame image to retrieve
<DT><B>Returns:</B><DD>The image of the specified animation frame</DL>
</DD>
</DL>
<HR>
<A NAME="getFrameCount()"><!-- --></A><H3>
getFrameCount</H3>
<PRE>
public int <B>getFrameCount</B>()</PRE>
<DL>
<DD>Get the number of frames that are in the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The number of frames that are in the animation</DL>
</DD>
</DL>
<HR>
<A NAME="getCurrentFrame()"><!-- --></A><H3>
getCurrentFrame</H3>
<PRE>
public <A HREF="../../../org/newdawn/slick/Image.html" title="class in org.newdawn.slick">Image</A> <B>getCurrentFrame</B>()</PRE>
<DL>
<DD>Get the image associated with the current animation frame
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The image associated with the current animation frame</DL>
</DD>
</DL>
<HR>
<A NAME="setLooping(boolean)"><!-- --></A><H3>
setLooping</H3>
<PRE>
public void <B>setLooping</B>(boolean&nbsp;loop)</PRE>
<DL>
<DD>Indicate if this animation should loop or stop at the last frame
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>loop</CODE> - True if this animation should loop (true = default)</DL>
</DD>
</DL>
<HR>
<A NAME="stopAt(int)"><!-- --></A><H3>
stopAt</H3>
<PRE>
public void <B>stopAt</B>(int&nbsp;frameIndex)</PRE>
<DL>
<DD>Indicate the animation should stop when it reaches the specified
frame index (note, not frame number but index in the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>frameIndex</CODE> - The index of the frame to stop at</DL>
</DD>
</DL>
<HR>
<A NAME="getDuration(int)"><!-- --></A><H3>
getDuration</H3>
<PRE>
public int <B>getDuration</B>(int&nbsp;index)</PRE>
<DL>
<DD>Get the duration of a particular frame
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The index of the given frame
<DT><B>Returns:</B><DD>The duration in (ms) of the given frame</DL>
</DD>
</DL>
<HR>
<A NAME="setDuration(int, int)"><!-- --></A><H3>
setDuration</H3>
<PRE>
public void <B>setDuration</B>(int&nbsp;index,
int&nbsp;duration)</PRE>
<DL>
<DD>Set the duration of the given frame
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The index of the given frame<DD><CODE>duration</CODE> - The duration in (ms) for the given frame</DL>
</DD>
</DL>
<HR>
<A NAME="getDurations()"><!-- --></A><H3>
getDurations</H3>
<PRE>
public int[] <B>getDurations</B>()</PRE>
<DL>
<DD>Get the durations of all the frames in this animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The durations of all the frames in this animation</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><CODE>Object.toString()</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="copy()"><!-- --></A><H3>
copy</H3>
<PRE>
public <A HREF="../../../org/newdawn/slick/Animation.html" title="class in org.newdawn.slick">Animation</A> <B>copy</B>()</PRE>
<DL>
<DD>Create a copy of this animation. Note that the frames
are not duplicated but shared with the original
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>A copy of this animation</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/Animation.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/newdawn/slick/AngelCodeFont.html" title="class in org.newdawn.slick"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/newdawn/slick/AppGameContainer.html" title="class in org.newdawn.slick"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/newdawn/slick/Animation.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Animation.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;NESTED&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>
<i>Copyright &#169; 2006 New Dawn Software. All Rights Reserved.</i>
</BODY>
</HTML>