📄 packedcolormodel.html
字号:
the bits of the pixel values that represent the blue color component<DD><CODE>amask</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>space</code> is not a TYPE_RGB space<DT><B>See Also: </B><DD><A HREF="../../../java/awt/color/ColorSpace.html"><CODE>ColorSpace</CODE></A></DL></DD></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="getMask(int)"><!-- --></A><H3>getMask</H3><PRE>public final int <B>getMask</B>(int index)</PRE><DL><DD>Returns the mask indicating which bits in a pixel contain the specified color/alpha sample. For color samples, <code>index</code> corresponds to the placement of color sample names in the color space. Thus, an <code>index</code> equal to 0 for a CMYK ColorSpace would correspond to Cyan and an <code>index</code> equal to 1 would correspond to Magenta. If there is alpha, the alpha <code>index</code> would be: <pre> alphaIndex = numComponents() - 1; </pre><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the specified color or alpha sample<DT><B>Returns:</B><DD>the mask, which indicates which bits of the <code>int</code> pixel representation contain the color or alpha sample specified by <code>index</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if <code>index</code> is greater than the number of components minus 1 in this <code>PackedColorModel</code> or if <code>index</code> is less than zero</DL></DD></DL><HR><A NAME="getMasks()"><!-- --></A><H3>getMasks</H3><PRE>public final int[] <B>getMasks</B>()</PRE><DL><DD>Returns a mask array indicating which bits in a pixel contain the color and alpha samples.<DD><DL><DT><B>Returns:</B><DD>the mask array , which indicates which bits of the <code>int</code> pixel representation contain the color or alpha samples.</DL></DD></DL><HR><A NAME="createCompatibleSampleModel(int, int)"><!-- --></A><H3>createCompatibleSampleModel</H3><PRE>public <A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A> <B>createCompatibleSampleModel</B>(int w, int h)</PRE><DL><DD>Creates a <code>SampleModel</code> with the specified width and height that has a data layout compatible with this <code>ColorModel</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#createCompatibleSampleModel(int, int)">createCompatibleSampleModel</A></CODE> in class <CODE><A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>w</CODE> - the width (in pixels) of the region of the image data described<DD><CODE>h</CODE> - the height (in pixels) of the region of the image data described<DT><B>Returns:</B><DD>the newly created <code>SampleModel</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>w</code> or <code>h</code> is not greater than 0<DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/SampleModel.html"><CODE>SampleModel</CODE></A></DL></DD></DL><HR><A NAME="isCompatibleSampleModel(java.awt.image.SampleModel)"><!-- --></A><H3>isCompatibleSampleModel</H3><PRE>public boolean <B>isCompatibleSampleModel</B>(<A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A> sm)</PRE><DL><DD>Checks if the specified <code>SampleModel</code> is compatible with this <code>ColorModel</code>. If <code>sm</code> is <code>null</code>, this method returns <code>false</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#isCompatibleSampleModel(java.awt.image.SampleModel)">isCompatibleSampleModel</A></CODE> in class <CODE><A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>sm</CODE> - the specified <code>SampleModel</code>, or <code>null</code><DT><B>Returns:</B><DD><code>true</code> if the specified <code>SampleModel</code> is compatible with this <code>ColorModel</code>; <code>false</code> otherwise.<DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/SampleModel.html"><CODE>SampleModel</CODE></A></DL></DD></DL><HR><A NAME="getAlphaRaster(java.awt.image.WritableRaster)"><!-- --></A><H3>getAlphaRaster</H3><PRE>public <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>getAlphaRaster</B>(<A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> raster)</PRE><DL><DD>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>. This method assumes that <code>WritableRaster</code> objects associated with this <code>ColorModel</code> store the alpha band, if present, as the last band of image data. Returns <code>null</code> if there is no separate spatial alpha channel associated with this <code>ColorModel</code>. This method creates a new <code>WritableRaster</code>, but shares the data array.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getAlphaRaster(java.awt.image.WritableRaster)">getAlphaRaster</A></CODE> in class <CODE><A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>raster</CODE> - a <code>WritableRaster</code> containing an image<DT><B>Returns:</B><DD>a <code>WritableRaster</code> that represents the alpha channel of the image contained in <code>raster</code>.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Tests if the specified <code>Object</code> is an instance of <code>PackedColorModel</code> and equals this <code>PackedColorModel</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the <code>Object</code> to test for equality<DT><B>Returns:</B><DD><code>true</code> if the specified <code>Object</code> is an instance of <code>PackedColorModel</code> and equals this <code>PackedColorModel</code>; <code>false</code> otherwise.</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/PackedColorModel.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/MultiPixelPackedSampleModel.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/image/PixelGrabber.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="PackedColorModel.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_java.awt.image.ColorModel">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 + -