colormodel.html

来自「API資料大全」· HTML 代码 · 共 1,326 行 · 第 1/5 页

HTML
1,326
字号
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#createCompatibleWritableRaster(int, int)">createCompatibleWritableRaster</A></B>(int&nbsp;w,                               int&nbsp;h)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>WritableRaster</code> with the specified width and height that has a data layout (<code>SampleModel</code>) compatible with this <code>ColorModel</code>.</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="../../../java/awt/image/ColorModel.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests if the specified <code>Object</code> is an instance of <code>ColorModel</code> and if it equals this <code>ColorModel</code>.</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="../../../java/awt/image/ColorModel.html#finalize()">finalize</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disposes of system resources associated with this  <code>ColorModel</code> once this <code>ColorModel</code> is no longer referenced.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getAlpha(int)">getAlpha</A></B>(int&nbsp;pixel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the alpha component for the specified pixel, scaled from 0 to 255.</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="../../../java/awt/image/ColorModel.html#getAlpha(java.lang.Object)">getAlpha</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the alpha component for the specified pixel, scaled from 0 to 255.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getAlphaRaster(java.awt.image.WritableRaster)">getAlphaRaster</A></B>(<A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A>&nbsp;raster)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>Raster</code> representing the alpha channel of an image, extracted from the input <code>Raster</code>, provided that pixel values of this <code>ColorModel</code> represent color and alpha information as separate spatial bands (e.g.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getBlue(int)">getBlue</A></B>(int&nbsp;pixel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.</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="../../../java/awt/image/ColorModel.html#getBlue(java.lang.Object)">getBlue</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB <code>ColorSpace</code>, sRGB.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/color/ColorSpace.html">ColorSpace</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getColorSpace()">getColorSpace</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>ColorSpace</code> associated with this  <code>ColorModel</code>.</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="../../../java/awt/image/ColorModel.html#getComponents(int, int[], int)">getComponents</A></B>(int&nbsp;pixel,              int[]&nbsp;components,              int&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of unnormalized color/alpha components given a pixel  in this <code>ColorModel</code>.</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="../../../java/awt/image/ColorModel.html#getComponents(java.lang.Object, int[], int)">getComponents</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;pixel,              int[]&nbsp;components,              int&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of unnormalized color/alpha components given a pixel in this <code>ColorModel</code>.</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="../../../java/awt/image/ColorModel.html#getComponentSize()">getComponentSize</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of the number of bits per color/alpha component.</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="../../../java/awt/image/ColorModel.html#getComponentSize(int)">getComponentSize</A></B>(int&nbsp;componentIdx)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bits for the specified color/alpha component.</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="../../../java/awt/image/ColorModel.html#getDataElement(int[], int)">getDataElement</A></B>(int[]&nbsp;components,               int&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a pixel value represented as an <code>int</code> in this <code>ColorModel</code>, given an array of unnormalized color/alpha components.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getDataElements(int[], int, java.lang.Object)">getDataElements</A></B>(int[]&nbsp;components,                int&nbsp;offset,                <A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a data element array representation of a pixel in this <code>ColorModel</code>, given an array of unnormalized color/alpha components.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getDataElements(int, java.lang.Object)">getDataElements</A></B>(int&nbsp;rgb,                <A HREF="../../../java/lang/Object.html">Object</A>&nbsp;pixel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a data element array representation of a pixel in this <code>ColorModel</code>, given an integer pixel representation in the default RGB color model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getGreen(int)">getGreen</A></B>(int&nbsp;pixel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.</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="../../../java/awt/image/ColorModel.html#getGreen(java.lang.Object)">getGreen</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB <code>ColorSpace</code>, sRGB.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getNormalizedComponents(int[], int, float[], int)">getNormalizedComponents</A></B>(int[]&nbsp;components,                        int&nbsp;offset,                        float[]&nbsp;normComponents,                        int&nbsp;normOffset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of all of the color/alpha components in normalized form, given an unnormalized component array.</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="../../../java/awt/image/ColorModel.html#getNumColorComponents()">getNumColorComponents</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of color components in this <code>ColorModel</code>.</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="../../../java/awt/image/ColorModel.html#getNumComponents()">getNumComponents</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of components, including alpha, in this <code>ColorModel</code>.</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="../../../java/awt/image/ColorModel.html#getPixelSize()">getPixelSize</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bits per pixel described by this  <code>ColorModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getRed(int)">getRed</A></B>(int&nbsp;pixel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.</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="../../../java/awt/image/ColorModel.html#getRed(java.lang.Object)">getRed</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB <code>ColorSpace</code>, sRGB.</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="../../../java/awt/image/ColorModel.html#getRGB(int)">getRGB</A></B>(int&nbsp;pixel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the color/alpha components of the pixel in the default RGB color model format.</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="../../../java/awt/image/ColorModel.html#getRGB(java.lang.Object)">getRGB</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the color/alpha components for the specified pixel in the default RGB color model format.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ColorModel.html#getRGBdefault()">getRGBdefault</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>DirectColorModel</code> that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD>

⌨️ 快捷键说明

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