⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sprite3d.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 instead. The maximum crop rectangle size can be queried with <A HREF="../../../javax/microedition/m3g/Graphics3D.html#getProperties()"><CODE>getProperties</CODE></A>.</p>
<P>
<DT><B>Parameters:</B><DD><CODE>scaled</CODE> - <i>true</i> to make this Sprite3D scaled;        <i>false</i> to disable scaling<DD><CODE>image</CODE> - pixel data and image properties to use        to draw this Sprite3D<DD><CODE>appearance</CODE> - the Appearance to use for this Sprite3D,        or null to disable this sprite initially<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>image</code> is null</DL>

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

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

<A NAME="isScaled()"><!-- --></A><H3>
isScaled</H3>
<PRE>
public boolean <B>isScaled</B>()</PRE>
<DL>
<DD><p>Returns the automatic scaling status of this Sprite3D. Note that the scaling mode cannot be changed after construction.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD><i>true</i> if this sprite is scaled; <i>false</i> if         it is unscaled</DL>
</DD>
</DL>
<HR>

<A NAME="setAppearance(javax.microedition.m3g.Appearance)"><!-- --></A><H3>
setAppearance</H3>
<PRE>
public void <B>setAppearance</B>(<A HREF="../../../javax/microedition/m3g/Appearance.html">Appearance</A>&nbsp;appearance)</PRE>
<DL>
<DD><p>Sets the Appearance of this Sprite3D. Note that the PolygonMode, Texture and Material components of the Appearance are ignored.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>appearance</CODE> - the Appearance to set, or null to disable this sprite<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Sprite3D.html#getAppearance()"><CODE>getAppearance</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getAppearance()"><!-- --></A><H3>
getAppearance</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/Appearance.html">Appearance</A> <B>getAppearance</B>()</PRE>
<DL>
<DD><p>Gets the current Appearance of this Sprite3D.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current Appearance of this sprite<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Sprite3D.html#setAppearance(javax.microedition.m3g.Appearance)"><CODE>setAppearance</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setImage(javax.microedition.m3g.Image2D)"><!-- --></A><H3>
setImage</H3>
<PRE>
public void <B>setImage</B>(<A HREF="../../../javax/microedition/m3g/Image2D.html">Image2D</A>&nbsp;image)</PRE>
<DL>
<DD><p>Sets the sprite image to display. The crop rectangle is reset in the same way as in the constructor.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>image</CODE> - pixel data and image properties to use to draw this sprite<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>image</code> is null<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Sprite3D.html#getImage()"><CODE>getImage</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getImage()"><!-- --></A><H3>
getImage</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/Image2D.html">Image2D</A> <B>getImage</B>()</PRE>
<DL>
<DD><p>Gets the current Sprite3D image.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the Image2D object used to draw this sprite<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Sprite3D.html#setImage(javax.microedition.m3g.Image2D)"><CODE>setImage</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setCrop(int, int, int, int)"><!-- --></A><H3>
setCrop</H3>
<PRE>
public void <B>setCrop</B>(int&nbsp;cropX,                    int&nbsp;cropY,                    int&nbsp;width,                    int&nbsp;height)</PRE>
<DL>
<DD><p>Sets a cropping rectangle within the source image. This allows a subsection of the image to be used as the source for the pixels of the sprite. This can be used for selection of individual frames of animation, scrolling of captions, or other effects.</p> <p>The position of the upper left corner of the crop rectangle is given in pixels, relative to the upper left corner of the Image2D. Note that the relative position may be negative in either or both axes.</p> <p>If the crop rectangle has zero width or height, the sprite is not rendered or picked. If, on the other hand, the width and/or height are negative, the sprite image is flipped in the X and/or Y axes, respectively. Note that the crop rectangle remains in the same position within the source image regardless of the signs of the width and height; only the drawing order of the pixels is changed.</p>      <p>The absolute values of the crop width and height are limited to an implementation defined maximum that can be queried from Graphics3D.</p> <p>Wrapping of the source image is not supported. If the crop rectangle lies completely or partially outside of the image boundaries, the (imaginary) pixels outside of the image are treated as if failing the alpha test. In other words, they are not rendered, but the on-screen size and pixel zoom factor of the sprite remain the same as if the crop rectangle were completely inside the image.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cropX</CODE> - the X position of the top left of the crop        rectangle, in pixels<DD><CODE>cropY</CODE> - the Y position of the top left of the crop        rectangle, in pixels<DD><CODE>width</CODE> - the width of the crop rectangle, in pixels<DD><CODE>height</CODE> - the height of the crop rectangle, in pixels<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>width</code> or         <code>height</code> exceeds the implementation defined         maximum</DL>
</DD>
</DL>
<HR>

<A NAME="getCropX()"><!-- --></A><H3>
getCropX</H3>
<PRE>
public int <B>getCropX</B>()</PRE>
<DL>
<DD><p>Retrieves the current cropping rectangle X offset relative to the source image top left corner.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the X offset of the cropping rectangle<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Sprite3D.html#setCrop(int, int, int, int)"><CODE>setCrop</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getCropY()"><!-- --></A><H3>
getCropY</H3>
<PRE>
public int <B>getCropY</B>()</PRE>
<DL>
<DD><p>Retrieves the current cropping rectangle Y offset relative to the source image top left corner.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the Y offset of the cropping rectangle<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Sprite3D.html#setCrop(int, int, int, int)"><CODE>setCrop</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getCropWidth()"><!-- --></A><H3>
getCropWidth</H3>
<PRE>
public int <B>getCropWidth</B>()</PRE>
<DL>
<DD><p>Gets the current cropping rectangle width within the source image. The width may be negative, in which case the image data is flipped in the X axis.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the width of the cropping rectangle<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Sprite3D.html#setCrop(int, int, int, int)"><CODE>setCrop</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getCropHeight()"><!-- --></A><H3>
getCropHeight</H3>
<PRE>
public int <B>getCropHeight</B>()</PRE>
<DL>
<DD><p>Gets the current cropping rectangle height within the source image. The height may be negative, in which case the image data is flipped in the Y axis.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the height of the cropping rectangle<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Sprite3D.html#setCrop(int, int, int, int)"><CODE>setCrop</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <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/Sprite3D.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-files/index-1.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><B>Nov 19, 2003</B></EM></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/m3g/SkinnedMesh.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/m3g/Texture2D.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Sprite3D.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT>  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT><A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_javax.microedition.m3g.Node">FIELD</A>&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>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<EM>Copyright &copy 2003 Nokia Corporation. See the <a href="../../../overview-summary.html#Copyright">Copyright Notice</a> for details.</EM>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -