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

📄 image2d.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Image2D.html#getFormat()">getFormat</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the internal format of this Image2D. </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="../../../javax/microedition/m3g/Image2D.html#getHeight()">getHeight</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the height of this Image2D, in pixels. </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="../../../javax/microedition/m3g/Image2D.html#getWidth()">getWidth</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the width of this Image2D, in pixels. </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="../../../javax/microedition/m3g/Image2D.html#isMutable()">isMutable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries whether this Image2D is mutable. </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="../../../javax/microedition/m3g/Image2D.html#set(int, int, int, int, byte[])">set</A></B>(int&nbsp;x,    int&nbsp;y,    int&nbsp;width,    int&nbsp;height,    byte[]&nbsp;image)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates a rectangular area of this Image2D by copying pixels from a byte array. </TD>
</TR>
</TABLE>
&nbsp;<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>
&nbsp;<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>
&nbsp;
<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="ALPHA"><!-- --></A><H3>
ALPHA</H3>
<PRE>
public static final int <B>ALPHA</B></PRE>
<DL>
<DD><p>A constructor parameter specifying that this Image2D has an alpha component only. If the image data is supplied as a byte array, it must have one byte per pixel, representing the alpha value. This image format is useful for rendering objects with varying opacities, such as clouds. An <code>ALPHA</code> image can not be used as a rendering target or background.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Image2D.ALPHA">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="LUMINANCE"><!-- --></A><H3>
LUMINANCE</H3>
<PRE>
public static final int <B>LUMINANCE</B></PRE>
<DL>
<DD><p>A constructor parameter specifying that this Image2D has a luminance component only. If the image data is supplied as a byte array, it must have one byte per pixel, representing the luminance value. This image format is a cheaper alternative to RGB in cases where colors are not needed, for instance in light mapping. A <code>LUMINANCE</code> image can not be used as a rendering target or background.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Image2D.LUMINANCE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="LUMINANCE_ALPHA"><!-- --></A><H3>
LUMINANCE_ALPHA</H3>
<PRE>
public static final int <B>LUMINANCE_ALPHA</B></PRE>
<DL>
<DD><p>A constructor parameter specifying that this Image2D has luminance and alpha components. If the image data is supplied as a byte array, it must have two bytes per pixel, representing the luminance and alpha values, in that order. This image format is a cheap alternative to RGBA in cases where colors are not needed; for instance in light mapping. A <code>LUMINANCE_ALPHA</code> image can not be used as a rendering target or background.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Image2D.LUMINANCE_ALPHA">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="RGB"><!-- --></A><H3>
RGB</H3>
<PRE>
public static final int <B>RGB</B></PRE>
<DL>
<DD><p>A constructor parameter specifying that this Image2D has red, green and blue color components. If the image data is supplied as a byte array, it must be in RGB order, one byte per component.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Image2D.RGB">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="RGBA"><!-- --></A><H3>
RGBA</H3>
<PRE>
public static final int <B>RGBA</B></PRE>
<DL>
<DD><p>A constructor parameter specifying that this Image2D has red, green, blue and alpha components. If the image data is supplied as a byte array, it must be in RGBA order, one byte per component.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Image2D.RGBA">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="Image2D(int, java.lang.Object)"><!-- --></A><H3>
Image2D</H3>
<PRE>
public <B>Image2D</B>(int&nbsp;format,               java.lang.Object&nbsp;image)</PRE>
<DL>
<DD><p>Constructs an immutable Image2D by copying pixels from a MIDP or AWT Image. The type of the Image object depends on the Java profile that this specification is implemented on, as follows:</p>  <ul> <li><code>java.awt.Image</code> on profiles supporting AWT;</li> <li><code>javax.microedition.lcdui.Image</code> on profiles     supporting LCDUI;</li> <li>either of the above on profiles supporting both AWT and LCDUI.</li> </ul> <p>The width and height of the created Image2D are set equal to those of the given Image. If the internal format of this Image2D is incompatible with the source Image, the pixels are converted to the internal format as they are copied in. The conversion is done according to the <a href= "package-summary.html#PixelFormats">general rules</a> that are specified in the package description, with two exceptions:</p>  <ul> <li>Conversion from RGB to ALPHA is done in the same way     as RGB to LUMINANCE.</li> <li>Conversion from LUMINANCE to ALPHA is done by copying     the luminance value in as the alpha value.</li> </ul>
<P>
<DT><B>Parameters:</B><DD><CODE>format</CODE> - the internal pixel format of the new Image2D<DD><CODE>image</CODE> - pixels and image properties to copy into the new Image2D<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>image</code> is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>format</code> is not         one of the symbolic constants listed above<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>image</code> is not an Image         object appropriate to the underlying Java profile</DL>
<HR>

<A NAME="Image2D(int, int, int, byte[])"><!-- --></A><H3>
Image2D</H3>
<PRE>
public <B>Image2D</B>(int&nbsp;format,               int&nbsp;width,               int&nbsp;height,               byte[]&nbsp;image)</PRE>
<DL>
<DD><p>Constructs an immutable Image2D by copying pixels from a byte array.</p> <p>Pixels in <code>image</code> are ordered from left to right and top to bottom. The number of bytes per pixel and the order of components are determined by the specified format; see above.</p>
<P>
<DT><B>Parameters:</B><DD><CODE>format</CODE> - the internal pixel format of the new Image2D<DD><CODE>width</CODE> - width of the created image in pixels; must be positive<DD><CODE>height</CODE> - height of the created image in pixels; must be positive<DD><CODE>image</CODE> - pixel data as a byte array<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>image</code> is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>width &lt;= 0</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>height &lt;= 0</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>format</code> is not         one of the symbolic constants listed above<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>image.length &lt;         width*height*bpp</code>, where <code>bpp</code> is         the number of bytes per pixel</DL>
<HR>

<A NAME="Image2D(int, int, int, byte[], byte[])"><!-- --></A><H3>
Image2D</H3>
<PRE>

⌨️ 快捷键说明

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