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

📄 imagecomponent2d.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<PRE>public <B>ImageComponent2D</B>(int&nbsp;format,                        int&nbsp;width,                        int&nbsp;height,                        boolean&nbsp;byReference,                        boolean&nbsp;yUp)</PRE><DL><DD>Constructs a 2D image component object using the specified format, width, height, byReference flag, and yUp flag. Default values are used for all other parameters.<P><DL><DT><B>Parameters:</B><DD><CODE>format</CODE> - the image component format, one of: FORMAT_RGB, FORMAT_RGBA, etc.<DD><CODE>width</CODE> - the number of columns of pixels in this image component object<DD><CODE>height</CODE> - the number of rows of pixels in this image component object<DD><CODE>byReference</CODE> - a flag that indicates whether the data is copied into this image component object or is accessed by reference.<DD><CODE>yUp</CODE> - a flag that indicates the y-orientation of this image component.  If yUp is set to true, the origin of the image is the lower left; otherwise, the origin of the image is the upper left.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if format is invalid, or if width or height are not positive.<DT><B>Since:</B></DT>  <DD>Java 3D 1.2</DD></DL></DL><HR><A NAME="ImageComponent2D(int, java.awt.image.BufferedImage, boolean, boolean)"><!-- --></A><H3>ImageComponent2D</H3><PRE>public <B>ImageComponent2D</B>(int&nbsp;format,                        java.awt.image.BufferedImage&nbsp;image,                        boolean&nbsp;byReference,                        boolean&nbsp;yUp)</PRE><DL><DD>Constructs a 2D image component object using the specified format, BufferedImage, byReference flag, and yUp flag. The image class is set to ImageClass.BUFFERED_IMAGE.<P><DL><DT><B>Parameters:</B><DD><CODE>format</CODE> - the image component format, one of: FORMAT_RGB, FORMAT_RGBA, etc.<DD><CODE>image</CODE> - the BufferedImage used to create this 2D image component<DD><CODE>byReference</CODE> - a flag that indicates whether the data is copied into this image component object or is accessed by reference<DD><CODE>yUp</CODE> - a flag that indicates the y-orientation of this image component.  If yUp is set to true, the origin of the image is the lower left; otherwise, the origin of the image is the upper left.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if format is invalid, or if the width or height of the image are not positive.<DT><B>Since:</B></DT>  <DD>Java 3D 1.2</DD></DL></DL><HR><A NAME="ImageComponent2D(int, java.awt.image.RenderedImage, boolean, boolean)"><!-- --></A><H3>ImageComponent2D</H3><PRE>public <B>ImageComponent2D</B>(int&nbsp;format,                        java.awt.image.RenderedImage&nbsp;image,                        boolean&nbsp;byReference,                        boolean&nbsp;yUp)</PRE><DL><DD>Constructs a 2D image component object using the specified format, RenderedImage, byReference flag, and yUp flag. The image class is set to ImageClass.RENDERED_IMAGE if the byReferece flag is true and the specified RenderedImage is <i>not</i> an instance of BufferedImage. In all other cases, the image class is set to ImageClass.BUFFERED_IMAGE.<P><DL><DT><B>Parameters:</B><DD><CODE>format</CODE> - the image component format, one of: FORMAT_RGB, FORMAT_RGBA, etc.<DD><CODE>image</CODE> - the RenderedImage used to create this 2D image component<DD><CODE>byReference</CODE> - a flag that indicates whether the data is copied into this image component object or is accessed by reference.<DD><CODE>yUp</CODE> - a flag that indicates the y-orientation of this image component.  If yUp is set to true, the origin of the image is the lower left; otherwise, the origin of the image is the upper left.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if format is invalid, or if the width or height of the image are not positive.<DT><B>Since:</B></DT>  <DD>Java 3D 1.2</DD></DL></DL><HR><A NAME="ImageComponent2D(int, javax.media.j3d.NioImageBuffer, boolean, boolean)"><!-- --></A><H3>ImageComponent2D</H3><PRE>public <B>ImageComponent2D</B>(int&nbsp;format,                        <A HREF="../../../javax/media/j3d/NioImageBuffer.html" title="class in javax.media.j3d">NioImageBuffer</A>&nbsp;image,                        boolean&nbsp;byReference,                        boolean&nbsp;yUp)</PRE><DL><DD>Constructs a 2D image component object using the specified format, NioImageBuffer, byReference flag, and yUp flag. The image class is set to ImageClass.NIO_IMAGE_BUFFER.<P><DL><DT><B>Parameters:</B><DD><CODE>format</CODE> - the image component format, one of: FORMAT_RGB, FORMAT_RGBA, etc.<DD><CODE>image</CODE> - the NioImageBuffer used to create this 2D image component<DD><CODE>byReference</CODE> - a flag that indicates whether the data is copied into this image component object or is accessed by reference.<DD><CODE>yUp</CODE> - a flag that indicates the y-orientation of this image component.  If yUp is set to true, the origin of the image is the lower left; otherwise, the origin of the image is the upper left.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if format is invalid, or if the width or height of the image are not positive.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the byReference flag is false.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the yUp flag is false.<DT><B>Since:</B></DT>  <DD>Java 3D 1.5</DD></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="set(java.awt.image.BufferedImage)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(java.awt.image.BufferedImage&nbsp;image)</PRE><DL><DD>Sets this image component to the specified BufferedImage object. If the data access mode is not by-reference, then the BufferedImage data is copied into this object.  If the data access mode is by-reference, then a reference to the BufferedImage is saved, but the data is not necessarily copied. <p> The image class is set to ImageClass.BUFFERED_IMAGE.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - BufferedImage object containing the image. Its size must be the same as the current size of this ImageComponent2D object.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the width and height of the specified image is not equal to the width and height of this ImageComponent object.</DL></DD></DL><HR><A NAME="set(java.awt.image.RenderedImage)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(java.awt.image.RenderedImage&nbsp;image)</PRE><DL><DD>Sets this image component to the specified RenderedImage object.  If the data access mode is not by-reference, the RenderedImage data is copied into this object.  If the data access mode is by-reference, a reference to the RenderedImage is saved, but the data is not necessarily copied. <p> The image class is set to ImageClass.RENDERED_IMAGE if the the data access mode is by-reference and the specified RenderedImage is <i>not</i> an instance of BufferedImage. In all other cases, the image class is set to ImageClass.BUFFERED_IMAGE.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - RenderedImage object containing the image. Its size must be the same as the current size of this ImageComponent2D object.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the width and height of the specified image is not equal to the width and height of this ImageComponent object.<DT><B>Since:</B></DT>  <DD>Java 3D 1.2</DD></DL></DD></DL><HR><A NAME="set(javax.media.j3d.NioImageBuffer)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(<A HREF="../../../javax/media/j3d/NioImageBuffer.html" title="class in javax.media.j3d">NioImageBuffer</A>&nbsp;image)</PRE><DL><DD>Sets this image component to the specified NioImageBuffer object.  If the data access mode is not by-reference, the NioImageBuffer data is copied into this object.  If the data access mode is by-reference, a reference to the NioImageBuffer is saved, but the data is not necessarily copied. <p> The image class is set to ImageClass.NIO_IMAGE_BUFFER.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - NioImageBuffer object containing the image. Its size must be the same as the current size of this ImageComponent2D object.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DD><CODE>java.lang.IllegalStateException</CODE> - if this ImageComponent object is <i>not</i> yUp.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the width and height of the specified image is not equal to the width and height of this ImageComponent object.<DT><B>Since:</B></DT>  <DD>Java 3D 1.5</DD></DL></DD></DL><HR><A NAME="getImage()"><!-- --></A><H3>getImage</H3><PRE>public java.awt.image.BufferedImage <B>getImage</B>()</PRE><DL><DD>Retrieves the image from this ImageComponent2D object.  If the data access mode is not by-reference, a copy of the image is made.  If the data access mode is by-reference, the reference is returned.<P><DD><DL><DT><B>Returns:</B><DD>either a new BufferedImage object created from the data in this image component, or the BufferedImage object referenced by this image component.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DD><CODE>java.lang.IllegalStateException</CODE> - if the image class is not ImageClass.BUFFERED_IMAGE.</DL>

⌨️ 快捷键说明

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