📄 background.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Background.html#getImageModeY()">getImageModeY</A></B>()</CODE>
<BR>
Gets the current background image repeat mode for the Y dimension.</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/m3g/Background.html#isColorClearEnabled()">isColorClearEnabled</A></B>()</CODE>
<BR>
Queries whether color buffer clearing is enabled.</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/m3g/Background.html#isDepthClearEnabled()">isDepthClearEnabled</A></B>()</CODE>
<BR>
Queries whether depth buffer clearing is enabled.</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/m3g/Background.html#setColor(int)">setColor</A></B>(int ARGB)</CODE>
<BR>
Sets the background color. </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/m3g/Background.html#setColorClearEnable(boolean)">setColorClearEnable</A></B>(boolean enable)</CODE>
<BR>
Enables or disables color buffer clearing. </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/m3g/Background.html#setCrop(int, int, int, int)">setCrop</A></B>(int cropX, int cropY, int width, int height)</CODE>
<BR>
Sets a cropping rectangle within the background image. </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/m3g/Background.html#setDepthClearEnable(boolean)">setDepthClearEnable</A></B>(boolean enable)</CODE>
<BR>
Enables or disables depth buffer clearing. </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/m3g/Background.html#setImage(javax.microedition.m3g.Image2D)">setImage</A></B>(<A HREF="../../../javax/microedition/m3g/Image2D.html">Image2D</A> image)</CODE>
<BR>
Sets the background image, or switches from background image mode to background color mode. </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/m3g/Background.html#setImageMode(int, int)">setImageMode</A></B>(int modeX, int modeY)</CODE>
<BR>
Sets the background image repeat mode for the X and Y directions.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.microedition.m3g.Object3D"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.microedition.m3g.<A HREF="../../../javax/microedition/m3g/Object3D.html">Object3D</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/m3g/Object3D.html#addAnimationTrack(javax.microedition.m3g.AnimationTrack)">addAnimationTrack</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#animate(int)">animate</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#duplicate()">duplicate</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#find(int)">find</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getAnimationTrack(int)">getAnimationTrack</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getAnimationTrackCount()">getAnimationTrackCount</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getReferences(javax.microedition.m3g.Object3D[])">getReferences</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getUserID()">getUserID</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getUserObject()">getUserObject</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#removeAnimationTrack(javax.microedition.m3g.AnimationTrack)">removeAnimationTrack</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#setUserID(int)">setUserID</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#setUserObject(java.lang.Object)">setUserObject</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="BORDER"><!-- --></A><H3>
BORDER</H3>
<PRE>
public static final int <B>BORDER</B></PRE>
<DL>
<DD><p>Specifies that the imaginary pixels outside of the source image boundaries in X or Y direction are considered to have the background color.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Background.BORDER">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="REPEAT"><!-- --></A><H3>
REPEAT</H3>
<PRE>
public static final int <B>REPEAT</B></PRE>
<DL>
<DD><p>Specifies that the imaginary pixels outside of the source image boundaries in X or Y direction are considered to have the same color as the pixel in the corresponding position in the source image. Formally, a pixel at position X will have the same color as the pixel at position X % N, where N is the width or height of the image and % is the modulo operator.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Background.REPEAT">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="Background()"><!-- --></A><H3>
Background</H3>
<PRE>
public <B>Background</B>()</PRE>
<DL>
<DD><p>Constructs a new Background with default values. The default values are:</p> <ul> <li>color clear enable : <i>true</i> (clear the color buffer)</li> <li>depth clear enable : <i>true</i> (clear the depth buffer)</li> <li>background color : 0x00000000 (black, transparent)</li> <li>background image : null (use the background color only)</li> <li>background image mode : <code>BORDER, BORDER</code></li> <li>crop rectangle : undefined (reset at <code>setImage</code></li> </ul>
<P>
</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="setColorClearEnable(boolean)"><!-- --></A><H3>
setColorClearEnable</H3>
<PRE>
public void <B>setColorClearEnable</B>(boolean enable)</PRE>
<DL>
<DD><p>Enables or disables color buffer clearing. If color buffer clearing is enabled, the portion of the color buffer that corresponds to the viewport is cleared with the background image and/or the background color.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>enable</CODE> - <i>true</i> to enable color buffer clearing; <i>false</i> to disable</DL>
</DD>
</DL>
<HR>
<A NAME="isColorClearEnabled()"><!-- --></A><H3>
isColorClearEnabled</H3>
<PRE>
public boolean <B>isColorClearEnabled</B>()</PRE>
<DL>
<DD><p>Queries whether color buffer clearing is enabled.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD><i>true</i> if color buffer clearing is enabled; <i>false</i> if it is disabled</DL>
</DD>
</DL>
<HR>
<A NAME="setDepthClearEnable(boolean)"><!-- --></A><H3>
setDepthClearEnable</H3>
<PRE>
public void <B>setDepthClearEnable</B>(boolean enable)</PRE>
<DL>
<DD><p>Enables or disables depth buffer clearing. If depth buffer clearing is enabled, the portion of the depth buffer that corresponds to the viewport is cleared to the maximum depth value.</p> <p>This setting is ignored if depth buffering is disabled in Graphics3D (see <A HREF="../../../javax/microedition/m3g/Graphics3D.html#bindTarget(java.lang.Object, boolean, int)"><CODE>bindTarget</CODE></A>).</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>enable</CODE> - <i>true</i> to enable depth buffer clearing; <i>false</i> to disable</DL>
</DD>
</DL>
<HR>
<A NAME="isDepthClearEnabled()"><!-- --></A><H3>
isDepthClearEnabled</H3>
<PRE>
public boolean <B>isDepthClearEnabled</B>()</PRE>
<DL>
<DD><p>Queries whether depth buffer clearing is enabled.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD><i>true</i> if depth buffer clearing is enabled; <i>false</i> if it is disabled</DL>
</DD>
</DL>
<HR>
<A NAME="setColor(int)"><!-- --></A><H3>
setColor</H3>
<PRE>
public void <B>setColor</B>(int ARGB)</PRE>
<DL>
<DD><p>Sets the background color. This is the color that the imaginary pixels outside of the source image boundaries are considered to have in the <code>BORDER</code> mode. If there is no background image, the viewport is cleared with this color only.</p> <p>The alpha component of the background color is ignored when rendering to an RGB target.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ARGB</CODE> - the new background color in 0xAARRGGBB format<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Background.html#getColor()"><CODE>getColor</CODE></A></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -