⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 componentcolormodel.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:34:02 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  ComponentColorModel</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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/ComponentColorModel.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/image/ColorModel.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../java/awt/image/ComponentSampleModel.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="ComponentColorModel.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="#fields_inherited_from_class_java.awt.image.ColorModel">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;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.image</FONT><BR>Class  ComponentColorModel</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A>  |  +--<A HREF="../../../java/awt/image/ColorModel.html">java.awt.image.ColorModel</A>        |        +--<B>java.awt.image.ComponentColorModel</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/awt/Transparency.html">Transparency</A></DD></DL><HR><DL><DT>public class <B>ComponentColorModel</B><DT>extends <A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A></DL><P>A <CODE>ColorModel</CODE> class that works with pixel values that  represent color and alpha information as separate samples and that  store each sample in a separate data element.  This class can be  used with an arbitrary <CODE>ColorSpace</CODE>.  The number of  color samples in the pixel values must be same as the number of  color components in the <CODE>ColorSpace</CODE>. There may be a  single alpha sample.   <p> For those methods that use a primitive array pixel representation of type <CODE>transferType</CODE>, the array length is the same as the number of color and alpha samples. Color samples are stored first in the array followed by the alpha sample, if present.  The order of the color samples is specified by the <CODE>ColorSpace</CODE>.  Typically, this order reflects the  name of the color space type. For example, for <CODE>TYPE_RGB</CODE>,  index 0 corresponds to red, index 1 to green, and index 2 to blue.   The transfer types supported are <CODE>DataBuffer.TYPE_BYTE</CODE>,  <CODE>DataBuffer.TYPE_USHORT</CODE>, and <CODE>DataBuffer.TYPE_INT</CODE>. <p> The translation from pixel values to color/alpha components for display or processing purposes is a one-to-one correspondence of samples to components. The number of bits in a color or alpha sample of a pixel value might not be the same as the number of bits for the corresponding color or alpha component passed to the <CODE>ComponentColorModel</CODE> constructor.   This class assumes that the least significant n bits of a sample value  hold the component value, where n is the number of significant bits  for the component passed to the constructor.  It also assumes that  any higher-order bits in a sample value are zero. <p> Methods that use a single int pixel representation throw an <CODE>IllegalArgumentException</CODE>, unless the number of components  for the <CODE>ComponentColorModel</CODE> is one--in other words,  a single  color component and no alpha. <p> A <CODE>ComponentColorModel</CODE> can be used in conjunction with a  <CODE>ComponentSampleModel</CODE>, a <CODE>BandedSampleModel</CODE>,  or a <CODE>PixelInterleavedSampleModel</CODE> to construct a <CODE>BufferedImage</CODE>.<P><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A>, <A HREF="../../../java/awt/color/ColorSpace.html"><CODE>ColorSpace</CODE></A>, <A HREF="../../../java/awt/image/ComponentSampleModel.html"><CODE>ComponentSampleModel</CODE></A>, <A HREF="../../../java/awt/image/BandedSampleModel.html"><CODE>BandedSampleModel</CODE></A>, <A HREF="../../../java/awt/image/PixelInterleavedSampleModel.html"><CODE>PixelInterleavedSampleModel</CODE></A>, <A HREF="../../../java/awt/image/BufferedImage.html"><CODE>BufferedImage</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_java.awt.image.ColorModel"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields 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#pixel_bits">pixel_bits</A>, <A HREF="../../../java/awt/image/ColorModel.html#transferType">transferType</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_java.awt.Transparency"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface java.awt.<A HREF="../../../java/awt/Transparency.html">Transparency</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/Transparency.html#BITMASK">BITMASK</A>, <A HREF="../../../java/awt/Transparency.html#OPAQUE">OPAQUE</A>, <A HREF="../../../java/awt/Transparency.html#TRANSLUCENT">TRANSLUCENT</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/image/ComponentColorModel.html#ComponentColorModel(java.awt.color.ColorSpace, int[], boolean, boolean, int, int)">ComponentColorModel</A></B>(<A HREF="../../../java/awt/color/ColorSpace.html">ColorSpace</A>&nbsp;colorSpace,                    int[]&nbsp;bits,                    boolean&nbsp;hasAlpha,                    boolean&nbsp;isAlphaPremultiplied,                    int&nbsp;transparency,                    int&nbsp;transferType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <CODE>ComponentColorModel</CODE> from the specified  parameters.</TD></TR></TABLE>&nbsp;<!-- ========== 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>&nbsp;<A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ComponentColorModel.html#coerceData(java.awt.image.WritableRaster, boolean)">coerceData</A></B>(<A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A>&nbsp;raster,           boolean&nbsp;isAlphaPremultiplied)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ComponentColorModel.html#createCompatibleSampleModel(int, int)">createCompatibleSampleModel</A></B>(int&nbsp;w,                            int&nbsp;h)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/ComponentColorModel.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">

⌨️ 快捷键说明

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