📄 sprite.html
字号:
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#TRANS_MIRROR_ROT180">TRANS_MIRROR_ROT180</A></B></CODE>
<BR>
Causes the Sprite to appear reflected about its vertical center and then rotated clockwise by 180 degrees.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#TRANS_MIRROR_ROT270">TRANS_MIRROR_ROT270</A></B></CODE>
<BR>
Causes the Sprite to appear reflected about its vertical center and then rotated clockwise by 270 degrees.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#TRANS_MIRROR_ROT90">TRANS_MIRROR_ROT90</A></B></CODE>
<BR>
Causes the Sprite to appear reflected about its vertical center and then rotated clockwise by 90 degrees.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#TRANS_NONE">TRANS_NONE</A></B></CODE>
<BR>
No transform is applied to the Sprite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#TRANS_ROT180">TRANS_ROT180</A></B></CODE>
<BR>
Causes the Sprite to appear rotated clockwise by 180 degrees.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#TRANS_ROT270">TRANS_ROT270</A></B></CODE>
<BR>
Causes the Sprite to appear rotated clockwise by 270 degrees.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#TRANS_ROT90">TRANS_ROT90</A></B></CODE>
<BR>
Causes the Sprite to appear rotated clockwise by 90 degrees.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#Sprite(javax.microedition.lcdui.Image)">Sprite</A></B>(<A HREF="../../../../javax/microedition/lcdui/Image.html">Image</A> image)</CODE>
<BR>
Creates a new non-animated Sprite using the provided Image.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#Sprite(javax.microedition.lcdui.Image, int, int)">Sprite</A></B>(<A HREF="../../../../javax/microedition/lcdui/Image.html">Image</A> image, int frameWidth, int frameHeight)</CODE>
<BR>
Creates a new animated Sprite using frames contained in the provided Image.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#Sprite(javax.microedition.lcdui.game.Sprite)">Sprite</A></B>(<A HREF="../../../../javax/microedition/lcdui/game/Sprite.html">Sprite</A> s)</CODE>
<BR>
Creates a new Sprite from another Sprite.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#collidesWith(javax.microedition.lcdui.Image, int, int, boolean)">collidesWith</A></B>(<A HREF="../../../../javax/microedition/lcdui/Image.html">Image</A> image, int x, int y, boolean pixelLevel)</CODE>
<BR>
Checks for a collision between this Sprite and the specified Image with its upper left corner at the specified location.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#collidesWith(javax.microedition.lcdui.game.Sprite, boolean)">collidesWith</A></B>(<A HREF="../../../../javax/microedition/lcdui/game/Sprite.html">Sprite</A> s, boolean pixelLevel)</CODE>
<BR>
Checks for a collision between this Sprite and the specified Sprite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#collidesWith(javax.microedition.lcdui.game.TiledLayer, boolean)">collidesWith</A></B>(<A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html">TiledLayer</A> t, boolean pixelLevel)</CODE>
<BR>
Checks for a collision between this Sprite and the specified TiledLayer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#defineCollisionRectangle(int, int, int, int)">defineCollisionRectangle</A></B>(int x, int y, int width, int height)</CODE>
<BR>
Defines the Sprite's bounding rectangle that is used for collision detection purposes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#defineReferencePixel(int, int)">defineReferencePixel</A></B>(int x, int y)</CODE>
<BR>
Defines the reference pixel for this Sprite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#getFrame()">getFrame</A></B>()</CODE>
<BR>
Gets the current index in the frame sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#getFrameSequenceLength()">getFrameSequenceLength</A></B>()</CODE>
<BR>
Gets the number of elements in the frame sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#getRawFrameCount()">getRawFrameCount</A></B>()</CODE>
<BR>
Gets the number of raw frames for this Sprite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#getRefPixelX()">getRefPixelX</A></B>()</CODE>
<BR>
Gets the horizontal position of this Sprite's reference pixel in the painter's coordinate system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#getRefPixelY()">getRefPixelY</A></B>()</CODE>
<BR>
Gets the vertical position of this Sprite's reference pixel in the painter's coordinate system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#nextFrame()">nextFrame</A></B>()</CODE>
<BR>
Selects the next frame in the frame sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#paint(javax.microedition.lcdui.Graphics)">paint</A></B>(<A HREF="../../../../javax/microedition/lcdui/Graphics.html">Graphics</A> g)</CODE>
<BR>
Draws the Sprite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#prevFrame()">prevFrame</A></B>()</CODE>
<BR>
Selects the previous frame in the frame sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#setFrame(int)">setFrame</A></B>(int sequenceIndex)</CODE>
<BR>
Selects the current frame in the frame sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#setFrameSequence(int[])">setFrameSequence</A></B>(int[] sequence)</CODE>
<BR>
Set the frame sequence for this Sprite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/microedition/lcdui/game/Sprite.html#setImage(javax.microedition.lcdui.Image, int, int)">setImage</A></B>(<A HREF="../../../../javax/microedition/lcdui/Image.html">Image</A> img, int frameWidth, int frameHeight)</CODE>
<BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -