packedcolormodel.html
来自「API資料大全」· HTML 代码 · 共 557 行 · 第 1/3 页
HTML
557 行
int bmask, int amask, boolean isAlphaPremultiplied, int trans, int transferType)</CODE><BR> Constructs a <code>PackedColorModel</code> from the specified masks which indicate which bits in an <code>int</code> pixel representation contain the alpha, red, green and blue color samples.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/PackedColorModel.html#createCompatibleSampleModel(int, int)">createCompatibleSampleModel</A></B>(int w, int h)</CODE><BR> Creates a <code>SampleModel</code> with the specified width and height that has a data layout compatible with this <code>ColorModel</code>.</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/PackedColorModel.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> obj)</CODE><BR> Tests if the specified <code>Object</code> is an instance of <code>PackedColorModel</code> and equals this <code>PackedColorModel</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/PackedColorModel.html#getAlphaRaster(java.awt.image.WritableRaster)">getAlphaRaster</A></B>(<A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> raster)</CODE><BR> Returns a <A HREF="../../../java/awt/image/WritableRaster.html"><CODE>WritableRaster</CODE></A> representing the alpha channel of an image, extracted from the input <code>WritableRaster</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/PackedColorModel.html#getMask(int)">getMask</A></B>(int index)</CODE><BR> Returns the mask indicating which bits in a pixel contain the specified color/alpha sample.</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/PackedColorModel.html#getMasks()">getMasks</A></B>()</CODE><BR> Returns a mask array indicating which bits in a pixel contain the color and alpha samples.</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/PackedColorModel.html#isCompatibleSampleModel(java.awt.image.SampleModel)">isCompatibleSampleModel</A></B>(<A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A> sm)</CODE><BR> Checks if the specified <code>SampleModel</code> is compatible with this <code>ColorModel</code>.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.image.ColorModel"><!-- --></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/ColorModel.html">ColorModel</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/image/ColorModel.html#coerceData(java.awt.image.WritableRaster, boolean)">coerceData</A>, <A HREF="../../../java/awt/image/ColorModel.html#createCompatibleWritableRaster(int, int)">createCompatibleWritableRaster</A>, <A HREF="../../../java/awt/image/ColorModel.html#finalize()">finalize</A>, <A HREF="../../../java/awt/image/ColorModel.html#getAlpha(int)">getAlpha</A>, <A HREF="../../../java/awt/image/ColorModel.html#getAlpha(java.lang.Object)">getAlpha</A>, <A HREF="../../../java/awt/image/ColorModel.html#getBlue(int)">getBlue</A>, <A HREF="../../../java/awt/image/ColorModel.html#getBlue(java.lang.Object)">getBlue</A>, <A HREF="../../../java/awt/image/ColorModel.html#getColorSpace()">getColorSpace</A>, <A HREF="../../../java/awt/image/ColorModel.html#getComponents(int, int[], int)">getComponents</A>, <A HREF="../../../java/awt/image/ColorModel.html#getComponents(java.lang.Object, int[], int)">getComponents</A>, <A HREF="../../../java/awt/image/ColorModel.html#getComponentSize()">getComponentSize</A>, <A HREF="../../../java/awt/image/ColorModel.html#getComponentSize(int)">getComponentSize</A>, <A HREF="../../../java/awt/image/ColorModel.html#getDataElement(int[], int)">getDataElement</A>, <A HREF="../../../java/awt/image/ColorModel.html#getDataElements(int[], int, java.lang.Object)">getDataElements</A>, <A HREF="../../../java/awt/image/ColorModel.html#getDataElements(int, java.lang.Object)">getDataElements</A>, <A HREF="../../../java/awt/image/ColorModel.html#getGreen(int)">getGreen</A>, <A HREF="../../../java/awt/image/ColorModel.html#getGreen(java.lang.Object)">getGreen</A>, <A HREF="../../../java/awt/image/ColorModel.html#getNormalizedComponents(int[], int, float[], int)">getNormalizedComponents</A>, <A HREF="../../../java/awt/image/ColorModel.html#getNumColorComponents()">getNumColorComponents</A>, <A HREF="../../../java/awt/image/ColorModel.html#getNumComponents()">getNumComponents</A>, <A HREF="../../../java/awt/image/ColorModel.html#getPixelSize()">getPixelSize</A>, <A HREF="../../../java/awt/image/ColorModel.html#getRed(int)">getRed</A>, <A HREF="../../../java/awt/image/ColorModel.html#getRed(java.lang.Object)">getRed</A>, <A HREF="../../../java/awt/image/ColorModel.html#getRGB(int)">getRGB</A>, <A HREF="../../../java/awt/image/ColorModel.html#getRGB(java.lang.Object)">getRGB</A>, <A HREF="../../../java/awt/image/ColorModel.html#getRGBdefault()">getRGBdefault</A>, <A HREF="../../../java/awt/image/ColorModel.html#getTransferType()">getTransferType</A>, <A HREF="../../../java/awt/image/ColorModel.html#getTransparency()">getTransparency</A>, <A HREF="../../../java/awt/image/ColorModel.html#getUnnormalizedComponents(float[], int, int[], int)">getUnnormalizedComponents</A>, <A HREF="../../../java/awt/image/ColorModel.html#hasAlpha()">hasAlpha</A>, <A HREF="../../../java/awt/image/ColorModel.html#hashCode()">hashCode</A>, <A HREF="../../../java/awt/image/ColorModel.html#isAlphaPremultiplied()">isAlphaPremultiplied</A>, <A HREF="../../../java/awt/image/ColorModel.html#isCompatibleRaster(java.awt.image.Raster)">isCompatibleRaster</A>, <A HREF="../../../java/awt/image/ColorModel.html#toString()">toString</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="PackedColorModel(java.awt.color.ColorSpace, int, int[], int, boolean, int, int)"><!-- --></A><H3>PackedColorModel</H3><PRE>public <B>PackedColorModel</B>(<A HREF="../../../java/awt/color/ColorSpace.html">ColorSpace</A> space, int bits, int[] colorMaskArray, int alphaMask, boolean isAlphaPremultiplied, int trans, int transferType)</PRE><DL><DD>Constructs a <code>PackedColorModel</code> from a color mask array, which specifies which bits in an <code>int</code> pixel representation contain each of the color samples, and an alpha mask. Color components are in the specified <code>ColorSpace</code>. The length of <code>colorMaskArray</code> should be the number of components in the <code>ColorSpace</code>. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of an <code>int</code> pixel representation. If the <code>alphaMask</code> is 0, there is no alpha. If there is alpha, the <code>boolean</code> <code>isAlphaPremultiplied</code> specifies how to interpret color and alpha samples in pixel values. If the <code>boolean</code> is <code>true</code>, color samples are assumed to have been multiplied by the alpha sample. The transparency, <code>trans</code>, specifies what alpha values can be represented by this color model. The transfer type is the type of primitive array used to represent pixel values.<DD><DL><DT><B>Parameters:</B><DD><CODE>space</CODE> - the specified <code>ColorSpace</code><DD><CODE>bits</CODE> - the number of bits in the pixel values<DD><CODE>colorMaskArray</CODE> - array that specifies the masks representing the bits of the pixel values that represent the color components<DD><CODE>alphaMask</CODE> - specifies the mask representing the bits of the pixel values that represent the alpha component<DD><CODE>isAlphaPremultiplied</CODE> - <code>true</code> if color samples are premultiplied by the alpha sample; <code>false</code> otherwise<DD><CODE>trans</CODE> - specifies the alpha value that can be represented by this color model<DD><CODE>transferType</CODE> - the type of array used to represent pixel values<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>bits</code> is less than 1 or greater than 32</DL></DD></DL><HR><A NAME="PackedColorModel(java.awt.color.ColorSpace, int, int, int, int, int, boolean, int, int)"><!-- --></A><H3>PackedColorModel</H3><PRE>public <B>PackedColorModel</B>(<A HREF="../../../java/awt/color/ColorSpace.html">ColorSpace</A> space, int bits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int trans, int transferType)</PRE><DL><DD>Constructs a <code>PackedColorModel</code> from the specified masks which indicate which bits in an <code>int</code> pixel representation contain the alpha, red, green and blue color samples. Color components are in the specified <code>ColorSpace</code>, which must be of type ColorSpace.TYPE_RGB. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of an <code>int</code> pixel representation. If <code>amask</code> is 0, there is no alpha. If there is alpha, the <code>boolean</code> <code>isAlphaPremultiplied</code> specifies how to interpret color and alpha samples in pixel values. If the <code>boolean</code> is <code>true</code>, color samples are assumed to have been multiplied by the alpha sample. The transparency, <code>trans</code>, specifies what alpha values can be represented by this color model. The transfer type is the type of primitive array used to represent pixel values.<DD><DL><DT><B>Parameters:</B><DD><CODE>space</CODE> - the specified <code>ColorSpace</code><DD><CODE>bits</CODE> - the number of bits in the pixel values<DD><CODE>rmask</CODE> - specifies the mask representing the bits of the pixel values that represent the red color component<DD><CODE>gmask</CODE> - specifies the mask representing the bits of the pixel values that represent the green color component<DD><CODE>bmask</CODE> - specifies the mask representing
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?