📄 directcolormodel.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#coerceData(java.awt.image.WritableRaster, boolean)">coerceData</A></B>(<A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> raster, boolean isAlphaPremultiplied)</CODE><BR> Forces the raster data to match the state specified in the <code>isAlphaPremultiplied</code> variable, assuming the data is currently correctly described by this <code>ColorModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#createCompatibleWritableRaster(int, int)">createCompatibleWritableRaster</A></B>(int w, int h)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getAlpha(int)">getAlpha</A></B>(int pixel)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getAlpha(java.lang.Object)">getAlpha</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> inData)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getAlphaMask()">getAlphaMask</A></B>()</CODE><BR> Returns the mask indicating which bits in an <code>int</code> pixel representation contain the alpha component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getBlue(int)">getBlue</A></B>(int pixel)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getBlue(java.lang.Object)">getBlue</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> inData)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getBlueMask()">getBlueMask</A></B>()</CODE><BR> Returns the mask indicating which bits in an <code>int</code> pixel representation contain the blue color component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getComponents(int, int[], int)">getComponents</A></B>(int pixel, int[] components, int offset)</CODE><BR> 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> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getComponents(java.lang.Object, int[], int)">getComponents</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> pixel, int[] components, int offset)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getDataElement(int[], int)">getDataElement</A></B>(int[] components, int offset)</CODE><BR> 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> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getDataElements(int[], int, java.lang.Object)">getDataElements</A></B>(int[] components, int offset, <A HREF="../../../java/lang/Object.html">Object</A> obj)</CODE><BR> 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> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getDataElements(int, java.lang.Object)">getDataElements</A></B>(int rgb, <A HREF="../../../java/lang/Object.html">Object</A> pixel)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getGreen(int)">getGreen</A></B>(int pixel)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getGreen(java.lang.Object)">getGreen</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> inData)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getGreenMask()">getGreenMask</A></B>()</CODE><BR> Returns the mask indicating which bits in an <code>int</code> pixel representation contain the green color component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getRed(int)">getRed</A></B>(int pixel)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getRed(java.lang.Object)">getRed</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> inData)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getRedMask()">getRedMask</A></B>()</CODE><BR> Returns the mask indicating which bits in an <code>int</code> pixel representation contain the red color component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getRGB(int)">getRGB</A></B>(int pixel)</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#getRGB(java.lang.Object)">getRGB</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> inData)</CODE><BR> 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> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#isCompatibleRaster(java.awt.image.Raster)">isCompatibleRaster</A></B>(<A HREF="../../../java/awt/image/Raster.html">Raster</A> raster)</CODE><BR> Returns <code>true</code> if <code>raster</code> is compatible with this <code>ColorModel</code> and <code>false</code> if it is not.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/DirectColorModel.html#toString()">toString</A></B>()</CODE><BR> Returns a <code>String</code> that represents this <code>DirectColorModel</code>.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.image.PackedColorModel"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.awt.image.<A HREF="../../../java/awt/image/PackedColorModel.html">PackedColorModel</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/image/PackedColorModel.html#createCompatibleSampleModel(int, int)">createCompatibleSampleModel</A>, <A HREF="../../../java/awt/image/PackedColorModel.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/awt/image/PackedColorModel.html#getAlphaRaster(java.awt.image.WritableRaster)">getAlphaRaster</A>, <A HREF="../../../java/awt/image/PackedColorModel.html#getMask(int)">getMask</A>, <A HREF="../../../java/awt/image/PackedColorModel.html#getMasks()">getMasks</A>, <A HREF="../../../java/awt/image/PackedColorModel.html#isCompatibleSampleModel(java.awt.image.SampleModel)">isCompatibleSampleModel</A></CODE></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -