📄 imagecomponent2d.html
字号:
set</H3><PRE>public void <B>set</B>(java.awt.image.BufferedImage 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><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - BufferedImage object containing the image. The format and size must be the same as the current format in this ImageComponent2D object.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</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 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><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - RenderedImage object containing the image. The format and size must be the same as the current format in this ImageComponent2D object.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></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">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 data access mode is by-reference and the image referenced by this ImageComponent2D object is not an instance of BufferedImage.</DL></DD></DL><HR><A NAME="getRenderedImage()"><!-- --></A><H3>getRenderedImage</H3><PRE>public java.awt.image.RenderedImage <B>getRenderedImage</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 RenderedImage object created from the data in this image component, or the RenderedImage object referenced by this image component.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL></DD></DL><HR><A NAME="setSubImage(java.awt.image.RenderedImage, int, int, int, int, int, int)"><!-- --></A><H3>setSubImage</H3><PRE>public void <B>setSubImage</B>(java.awt.image.RenderedImage image, int width, int height, int srcX, int srcY, int dstX, int dstY)</PRE><DL><DD>Modifies a contiguous subregion of the image component. Block of data of dimension (width * height) starting at the offset (srcX, srcY) of the specified RenderedImage object will be copied into the image component starting at the offset (dstX, dstY) of the ImageComponent2D object. The RenderedImage object must be of the same format as the current format of this object. This method can only be used if the data access mode is by-copy. If it is by-reference, see updateData().<P><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - RenderedImage object containing the subimage.<DD><CODE>width</CODE> - width of the subregion.<DD><CODE>height</CODE> - height of the subregion.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">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 data access mode is <code>BY_REFERENCE</code>.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>width</code> or <code>height</code> of the subregion exceeds the dimension of the image of this object.<DT><B>Since:</B><DD>Java 3D 1.3</DD></DD></DL></DD></DL><HR><A NAME="updateData(javax.media.j3d.ImageComponent2D.Updater, int, int, int, int)"><!-- --></A><H3>updateData</H3><PRE>public void <B>updateData</B>(<A HREF="../../../javax/media/j3d/ImageComponent2D.Updater.html">ImageComponent2D.Updater</A> updater, int x, int y, int width, int height)</PRE><DL><DD>Updates image data that is accessed by reference. This method calls the updateData method of the specified ImageComponent2D.Updater object to synchronize updates to the image data that is referenced by this ImageComponent2D object. Applications that wish to modify such data must perform all updates via this method. <p> The data to be modified has to be within the boundary of the subregion specified by the offset (x, y) and the dimension (width*height). It is illegal to modify data outside this boundary. If any referenced data is modified outisde the updateData method, or any data outside the specified boundary is modified, the results are undefined. <p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>updater</CODE> - object whose updateData callback method will be called to update the data referenced by this ImageComponent2D object.<DD><CODE>width</CODE> - width of the subregion.<DD><CODE>height</CODE> - height of the subregion.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if the appropriate capability is not set, and this object is part of a live or compiled scene graph<DD><CODE>java.lang.IllegalStateException</CODE> - if the data access mode is <code>BY_COPY</code>.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>width</code> or <code>height</code> of the subregion exceeds the dimension of the image of this object.<DT><B>Since:</B><DD>Java 3D 1.3</DD></DD></DL></DD></DL><HR><A NAME="cloneNodeComponent()"><!-- --></A><H3>cloneNodeComponent</H3><PRE>public <A HREF="../../../javax/media/j3d/NodeComponent.html">NodeComponent</A> <B>cloneNodeComponent</B>()</PRE><DL><DD><B>Deprecated.</B> <I>replaced with cloneNodeComponent(boolean forceDuplicate)</I><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/media/j3d/NodeComponent.html#cloneNodeComponent()">cloneNodeComponent</A></CODE> in class <CODE><A HREF="../../../javax/media/j3d/NodeComponent.html">NodeComponent</A></CODE></DL></DD><DD><DL></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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/media/j3d/ImageComponent.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/ImageComponent3D.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> <A HREF="ImageComponent2D.html" TARGET="_top"><B>NO FRAMES</B></A> <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: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#fields_inherited_from_class_javax.media.j3d.ImageComponent">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -