image.html

来自「API資料大全」· HTML 代码 · 共 535 行 · 第 1/2 页

HTML
535
字号
<DD>Use the default image-scaling algorithm.<DD><DL><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="SCALE_FAST"><!-- --></A><H3>SCALE_FAST</H3><PRE>public static final int <B>SCALE_FAST</B></PRE><DL><DD>Choose an image-scaling algorithm that gives higher priority to scaling speed than smoothness of the scaled image.<DD><DL><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="SCALE_SMOOTH"><!-- --></A><H3>SCALE_SMOOTH</H3><PRE>public static final int <B>SCALE_SMOOTH</B></PRE><DL><DD>Choose an image-scaling algorithm that gives higher priority to image smoothness than scaling speed.<DD><DL><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="SCALE_REPLICATE"><!-- --></A><H3>SCALE_REPLICATE</H3><PRE>public static final int <B>SCALE_REPLICATE</B></PRE><DL><DD>Use the image scaling algorithm embodied in the  <code>ReplicateScaleFilter</code> class.   The <code>Image</code> object is free to substitute a different filter  that performs the same algorithm yet integrates more efficiently into the imaging infrastructure supplied by the toolkit.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/image/ReplicateScaleFilter.html"><CODE>ReplicateScaleFilter</CODE></A><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="SCALE_AREA_AVERAGING"><!-- --></A><H3>SCALE_AREA_AVERAGING</H3><PRE>public static final int <B>SCALE_AREA_AVERAGING</B></PRE><DL><DD>Use the Area Averaging image scaling algorithm.  The image object is free to substitute a different filter that performs the same algorithm yet integrates more efficiently into the image infrastructure supplied by the toolkit.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/image/AreaAveragingScaleFilter.html"><CODE>AreaAveragingScaleFilter</CODE></A><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></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="Image()"><!-- --></A><H3>Image</H3><PRE>public <B>Image</B>()</PRE><DL></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="getWidth(java.awt.image.ImageObserver)"><!-- --></A><H3>getWidth</H3><PRE>public abstract int <B>getWidth</B>(<A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</PRE><DL><DD>Determines the width of the image. If the width is not yet known,  this method returns <code>-1</code> and the specified    <code>ImageObserver</code> object is notified later.<DD><DL><DT><B>Parameters:</B><DD><CODE>observer</CODE> - an object waiting for the image to be loaded.<DT><B>Returns:</B><DD>the width of this image, or <code>-1</code>                    if the width is not yet known.<DT><B>See Also: </B><DD><A HREF="../../java/awt/Image.html#getHeight(java.awt.image.ImageObserver)"><CODE>getHeight(java.awt.image.ImageObserver)</CODE></A>, <A HREF="../../java/awt/image/ImageObserver.html"><CODE>ImageObserver</CODE></A></DL></DD></DL><HR><A NAME="getHeight(java.awt.image.ImageObserver)"><!-- --></A><H3>getHeight</H3><PRE>public abstract int <B>getHeight</B>(<A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</PRE><DL><DD>Determines the height of the image. If the height is not yet known,  this method returns <code>-1</code> and the specified   <code>ImageObserver</code> object is notified later.<DD><DL><DT><B>Parameters:</B><DD><CODE>observer</CODE> - an object waiting for the image to be loaded.<DT><B>Returns:</B><DD>the height of this image, or <code>-1</code>                    if the height is not yet known.<DT><B>See Also: </B><DD><A HREF="../../java/awt/Image.html#getWidth(java.awt.image.ImageObserver)"><CODE>getWidth(java.awt.image.ImageObserver)</CODE></A>, <A HREF="../../java/awt/image/ImageObserver.html"><CODE>ImageObserver</CODE></A></DL></DD></DL><HR><A NAME="getSource()"><!-- --></A><H3>getSource</H3><PRE>public abstract <A HREF="../../java/awt/image/ImageProducer.html">ImageProducer</A> <B>getSource</B>()</PRE><DL><DD>Gets the object that produces the pixels for the image. This method is called by the image filtering classes and by  methods that perform image conversion and scaling.<DD><DL><DT><B>Returns:</B><DD>the image producer that produces the pixels                                   for this image.<DT><B>See Also: </B><DD><A HREF="../../java/awt/image/ImageProducer.html"><CODE>ImageProducer</CODE></A></DL></DD></DL><HR><A NAME="getGraphics()"><!-- --></A><H3>getGraphics</H3><PRE>public abstract <A HREF="../../java/awt/Graphics.html">Graphics</A> <B>getGraphics</B>()</PRE><DL><DD>Creates a graphics context for drawing to an off-screen image.  This method can only be called for off-screen images.<DD><DL><DT><B>Returns:</B><DD>a graphics context to draw to the off-screen image.<DT><B>See Also: </B><DD><A HREF="../../java/awt/Graphics.html"><CODE>Graphics</CODE></A>, <A HREF="../../java/awt/Component.html#createImage(int, int)"><CODE>Component.createImage(int, int)</CODE></A></DL></DD></DL><HR><A NAME="getProperty(java.lang.String, java.awt.image.ImageObserver)"><!-- --></A><H3>getProperty</H3><PRE>public abstract <A HREF="../../java/lang/Object.html">Object</A> <B>getProperty</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name,                                   <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</PRE><DL><DD>Gets a property of this image by name.  <p> Individual property names are defined by the various image  formats. If a property is not defined for a particular image, this  method returns the <code>UndefinedProperty</code> object.  <p> If the properties for this image are not yet known, this method  returns <code>null</code>, and the <code>ImageObserver</code>  object is notified later.  <p> The property name <code>"comment"</code> should be used to store  an optional comment which can be presented to the application as a  description of the image, its source, or its author.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a property name.<DD><CODE>observer</CODE> - an object waiting for this image to be loaded.<DT><B>Returns:</B><DD>the value of the named property.<DT><B>See Also: </B><DD><A HREF="../../java/awt/image/ImageObserver.html"><CODE>ImageObserver</CODE></A>, <A HREF="../../java/awt/Image.html#UndefinedProperty"><CODE>UndefinedProperty</CODE></A></DL></DD></DL><HR><A NAME="getScaledInstance(int, int, int)"><!-- --></A><H3>getScaledInstance</H3><PRE>public <A HREF="../../java/awt/Image.html">Image</A> <B>getScaledInstance</B>(int&nbsp;width,                               int&nbsp;height,                               int&nbsp;hints)</PRE><DL><DD>Creates a scaled version of this image. A new <code>Image</code> object is returned which will render  the image at the specified <code>width</code> and  <code>height</code> by default.  The new <code>Image</code> object may be loaded asynchronously even if the original source image has already been loaded completely.  If either the <code>width</code>  or <code>height</code> is a negative number then a value is  substituted to maintain the aspect ratio of the original image  dimensions.<DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the width to which to scale the image.<DD><CODE>height</CODE> - the height to which to scale the image.<DD><CODE>hints</CODE> - flags to indicate the type of algorithm to use for image resampling.<DT><B>Returns:</B><DD>a scaled version of the image.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/Image.html#SCALE_DEFAULT"><CODE>SCALE_DEFAULT</CODE></A>, <A HREF="../../java/awt/Image.html#SCALE_FAST"><CODE>SCALE_FAST</CODE></A>, <A HREF="../../java/awt/Image.html#SCALE_SMOOTH"><CODE>SCALE_SMOOTH</CODE></A>, <A HREF="../../java/awt/Image.html#SCALE_REPLICATE"><CODE>SCALE_REPLICATE</CODE></A>, <A HREF="../../java/awt/Image.html#SCALE_AREA_AVERAGING"><CODE>SCALE_AREA_AVERAGING</CODE></A></DL></DD></DL><HR><A NAME="flush()"><!-- --></A><H3>flush</H3><PRE>public abstract void <B>flush</B>()</PRE><DL><DD>Flushes all resources being used by this Image object.  This includes any pixel data that is being cached for rendering to the screen as well as any system resources that are being used to store data or pixels for the image.  The image is reset to a state similar to when it was first created so that if it is again rendered, the image data will have to be recreated or fetched again from its source. <p> This method always leaves the image in a state such that it can  be reconstructed.  This means the method applies only to cached  or other secondary representations of images such as those that  have been generated from an <tt>ImageProducer</tt> (read from a  file, for example). It does nothing for off-screen images that  have only one copy of their data.</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Image.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/awt/GridLayout.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/awt/Insets.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>  &nbsp;&nbsp;<A HREF="Image.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + =
减小字号Ctrl + -
显示快捷键?