📄 imageconsumer.html
字号:
<HR><A NAME="TOPDOWNLEFTRIGHT"><!-- --></A><H3>TOPDOWNLEFTRIGHT</H3><PRE>public static final int <B>TOPDOWNLEFTRIGHT</B></PRE><DL><DD>The pixels will be delivered in top-down, left-to-right order.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageConsumer.html#setHints(int)"><CODE>setHints(int)</CODE></A></DL></DD></DL><HR><A NAME="COMPLETESCANLINES"><!-- --></A><H3>COMPLETESCANLINES</H3><PRE>public static final int <B>COMPLETESCANLINES</B></PRE><DL><DD>The pixels will be delivered in (multiples of) complete scanlines at a time.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageConsumer.html#setHints(int)"><CODE>setHints(int)</CODE></A></DL></DD></DL><HR><A NAME="SINGLEPASS"><!-- --></A><H3>SINGLEPASS</H3><PRE>public static final int <B>SINGLEPASS</B></PRE><DL><DD>The pixels will be delivered in a single pass. Each pixel will appear in only one call to any of the setPixels methods. An example of an image format which does not meet this criterion is a progressive JPEG image which defines pixels in multiple passes, each more refined than the previous.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageConsumer.html#setHints(int)"><CODE>setHints(int)</CODE></A></DL></DD></DL><HR><A NAME="SINGLEFRAME"><!-- --></A><H3>SINGLEFRAME</H3><PRE>public static final int <B>SINGLEFRAME</B></PRE><DL><DD>The image contain a single static image. The pixels will be defined in calls to the setPixels methods and then the imageComplete method will be called with the STATICIMAGEDONE flag after which no more image data will be delivered. An example of an image type which would not meet these criteria would be the output of a video feed, or the representation of a 3D rendering being manipulated by the user. The end of each frame in those types of images will be indicated by calling imageComplete with the SINGLEFRAMEDONE flag.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageConsumer.html#setHints(int)"><CODE>setHints(int)</CODE></A>, <A HREF="../../../java/awt/image/ImageConsumer.html#imageComplete(int)"><CODE>imageComplete(int)</CODE></A></DL></DD></DL><HR><A NAME="IMAGEERROR"><!-- --></A><H3>IMAGEERROR</H3><PRE>public static final int <B>IMAGEERROR</B></PRE><DL><DD>An error was encountered while producing the image.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageConsumer.html#imageComplete(int)"><CODE>imageComplete(int)</CODE></A></DL></DD></DL><HR><A NAME="SINGLEFRAMEDONE"><!-- --></A><H3>SINGLEFRAMEDONE</H3><PRE>public static final int <B>SINGLEFRAMEDONE</B></PRE><DL><DD>One frame of the image is complete but there are more frames to be delivered.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageConsumer.html#imageComplete(int)"><CODE>imageComplete(int)</CODE></A></DL></DD></DL><HR><A NAME="STATICIMAGEDONE"><!-- --></A><H3>STATICIMAGEDONE</H3><PRE>public static final int <B>STATICIMAGEDONE</B></PRE><DL><DD>The image is complete and there are no more pixels or frames to be delivered.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageConsumer.html#imageComplete(int)"><CODE>imageComplete(int)</CODE></A></DL></DD></DL><HR><A NAME="IMAGEABORTED"><!-- --></A><H3>IMAGEABORTED</H3><PRE>public static final int <B>IMAGEABORTED</B></PRE><DL><DD>The image creation process was deliberately aborted.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageConsumer.html#imageComplete(int)"><CODE>imageComplete(int)</CODE></A></DL></DD></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ 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="setDimensions(int, int)"><!-- --></A><H3>setDimensions</H3><PRE>public void <B>setDimensions</B>(int width, int height)</PRE><DL><DD>The dimensions of the source image are reported using the setDimensions method call.</DL><HR><A NAME="setProperties(java.util.Hashtable)"><!-- --></A><H3>setProperties</H3><PRE>public void <B>setProperties</B>(<A HREF="../../../java/util/Hashtable.html">Hashtable</A> props)</PRE><DL><DD>Sets the extensible list of properties associated with this image.</DL><HR><A NAME="setColorModel(java.awt.image.ColorModel)"><!-- --></A><H3>setColorModel</H3><PRE>public void <B>setColorModel</B>(<A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A> model)</PRE><DL><DD>The ColorModel object used for the majority of the pixels reported using the setPixels method calls. Note that each set of pixels delivered using setPixels contains its own ColorModel object, so no assumption should be made that this model will be the only one used in delivering pixel values. A notable case where multiple ColorModel objects may be seen is a filtered image when for each set of pixels that it filters, the filter determines whether the pixels can be sent on untouched, using the original ColorModel, or whether the pixels should be modified (filtered) and passed on using a ColorModel more convenient for the filtering process.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A></DL></DD></DL><HR><A NAME="setHints(int)"><!-- --></A><H3>setHints</H3><PRE>public void <B>setHints</B>(int hintflags)</PRE><DL><DD>The ImageProducer can deliver the pixels in any order, but the ImageConsumer may be able to scale or convert the pixels to the destination ColorModel more efficiently or with higher quality if it knows some information about how the pixels will be delivered up front. The setHints method should be called before any calls to any of the setPixels methods with a bit mask of hints about the manner in which the pixels will be delivered. If the ImageProducer does not follow the guidelines for the indicated hint, the results are undefined.</DL><HR><A NAME="setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)"><!-- --></A><H3>setPixels</H3><PRE>public void <B>setPixels</B>(int x, int y, int w, int h, <A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A> model, byte[] pixels, int off, int scansize)</PRE><DL><DD>The pixels of the image are delivered using one or more calls to the setPixels method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified ColorModel object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * scansize + m + off). The pixels delivered using this method are all stored as bytes.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A></DL></DD></DL><HR><A NAME="setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)"><!-- --></A><H3>setPixels</H3><PRE>public void <B>setPixels</B>(int x, int y, int w, int h, <A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A> model, int[] pixels, int off, int scansize)</PRE><DL><DD>The pixels of the image are delivered using one or more calls to the setPixels method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified ColorModel object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * scansize + m + off). The pixels delivered using this method are all stored as ints.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A></DL></DD></DL><HR><A NAME="imageComplete(int)"><!-- --></A><H3>imageComplete</H3><PRE>public void <B>imageComplete</B>(int status)</PRE><DL><DD>The imageComplete method is called when the ImageProducer is finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occured. The ImageConsumer should remove itself from the list of consumers registered with the ImageProducer at this time, unless it is interested in successive frames.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageProducer.html#removeConsumer(java.awt.image.ImageConsumer)"><CODE>ImageProducer.removeConsumer(java.awt.image.ImageConsumer)</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=2 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="class-use/ImageConsumer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/awt/image/BufferedImageOp.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/image/ImageObserver.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="ImageConsumer.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -