indexcolormodel.html

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

HTML
1,198
字号
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#isCompatibleRaster(java.awt.image.Raster)">isCompatibleRaster</A></B>(<A HREF="../../../java/awt/image/Raster.html">Raster</A>&nbsp;raster)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if <code>raster</code> is compatible  with this <code>ColorModel</code> or <code>false</code> if it  is not 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/IndexColorModel.html#isCompatibleSampleModel(java.awt.image.SampleModel)">isCompatibleSampleModel</A></B>(<A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A>&nbsp;sm)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the specified <code>SampleModel</code> is 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/IndexColorModel.html#isValid()">isValid</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether or not all of the pixels are valid.</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/IndexColorModel.html#isValid(int)">isValid</A></B>(int&nbsp;pixel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether or not the pixel is valid.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>String</code> representation of the contents of this <code>ColorModel</code>object.</TD></TR></TABLE>&nbsp;<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#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/awt/image/ColorModel.html#getAlpha(java.lang.Object)">getAlpha</A>, <A HREF="../../../java/awt/image/ColorModel.html#getAlphaRaster(java.awt.image.WritableRaster)">getAlphaRaster</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#getComponentSize(int)">getComponentSize</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(java.lang.Object)">getRed</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#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></CODE></TD></TR></TABLE>&nbsp;<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>&nbsp;<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="IndexColorModel(int, int, byte[], byte[], byte[])"><!-- --></A><H3>IndexColorModel</H3><PRE>public <B>IndexColorModel</B>(int&nbsp;bits,                       int&nbsp;size,                       byte[]&nbsp;r,                       byte[]&nbsp;g,                       byte[]&nbsp;b)</PRE><DL><DD>Constructs an <code>IndexColorModel</code> from the specified  arrays of red, green, and blue components.  Pixels described  by this color model all have alpha components of 255  unnormalized (1.0&nbsp;normalized), which means they are fully opaque.  All of the arrays specifying the color  components must have at least the specified number of entries.   The <code>ColorSpace</code> is the default sRGB space.  The  transparency value is Transparency.OPAQUE.  The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT that can hold a single pixel.<DD><DL><DT><B>Parameters:</B><DD><CODE>bits</CODE> - the number of bits each pixel occupies<DD><CODE>size</CODE> - the size of the color component arrays<DD><CODE>r</CODE> - the array of red color components<DD><CODE>g</CODE> - the array of green color components<DD><CODE>b</CODE> - the array of blue color components<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 16<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>size</code> is less         than 1</DL></DD></DL><HR><A NAME="IndexColorModel(int, int, byte[], byte[], byte[], int)"><!-- --></A><H3>IndexColorModel</H3><PRE>public <B>IndexColorModel</B>(int&nbsp;bits,                       int&nbsp;size,                       byte[]&nbsp;r,                       byte[]&nbsp;g,                       byte[]&nbsp;b,                       int&nbsp;trans)</PRE><DL><DD>Constructs an <code>IndexColorModel</code> from the given arrays  of red, green, and blue components.  Pixels described by this color model all have alpha components of 255 unnormalized  (1.0&nbsp;normalized), which means they are fully opaque, except  for the indicated transparent pixel.  All of the arrays specifying the color components must have at least the specified number of entries.  The ColorSpace is the default sRGB space. The transparency value is Transparency.BITMASK. The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT that can hold a single pixel.<DD><DL><DT><B>Parameters:</B><DD><CODE>bits</CODE> - the number of bits each pixel occupies<DD><CODE>size</CODE> - the size of the color component arrays<DD><CODE>r</CODE> - the array of red color components<DD><CODE>g</CODE> - the array of green color components<DD><CODE>b</CODE> - the array of blue color components<DD><CODE>trans</CODE> - the index of the transparent pixel<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 16<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>size</code> is less than          1</DL></DD></DL><HR><A NAME="IndexColorModel(int, int, byte[], byte[], byte[], byte[])"><!-- --></A><H3>IndexColorModel</H3><PRE>public <B>IndexColorModel</B>(int&nbsp;bits,                       int&nbsp;size,                       byte[]&nbsp;r,                       byte[]&nbsp;g,                       byte[]&nbsp;b,                       byte[]&nbsp;a)</PRE><DL><DD>Constructs an <code>IndexColorModel</code> from the given  arrays of red, green, blue and alpha components.  All of the  arrays specifying the components must have at least the specified  number of entries.  The ColorSpace is the default sRGB space. The transparency value is Transparency.TRANSLUCENT. The transfer type is the smallest of DataBuffer.TYPE_BYTE or  DataBuffer.TYPE_USHORT that can hold a single pixel.<DD><DL><DT><B>Parameters:</B><DD><CODE>bits</CODE> - the number of bits each pixel occupies<DD><CODE>size</CODE> - the size of the color component arrays<DD><CODE>r</CODE> - the array of red color components<DD><CODE>g</CODE> - the array of green color components<DD><CODE>b</CODE> - the array of blue color components<DD><CODE>a</CODE> - the array of alpha value components<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 16<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>size</code> is less           than 1</DL></DD></DL><HR><A NAME="IndexColorModel(int, int, byte[], int, boolean)"><!-- --></A><H3>IndexColorModel</H3><PRE>public <B>IndexColorModel</B>(int&nbsp;bits,                       int&nbsp;size,                       byte[]&nbsp;cmap,                       int&nbsp;start,                       boolean&nbsp;hasalpha)</PRE><DL><DD>Constructs an <code>IndexColorModel</code> from a single  array of interleaved red, green, blue and optional alpha  components.  The array must have enough values in it to  fill all of the needed component arrays of the specified  size.  The ColorSpace is the default sRGB space.  The  transparency value is Transparency.TRANSLUCENT if  <code>hasAlpha</code> is <code>true</code>, Transparency.OPAQUE otherwise.  The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT  that can hold a single pixel.<DD><DL><DT><B>Parameters:</B><DD><CODE>bits</CODE> - the number of bits each pixel occupies<DD><CODE>size</CODE> - the size of the color component arrays<DD><CODE>cmap</CODE> - the array of color components<DD><CODE>start</CODE> - the starting offset of the first color component<DD><CODE>hasalpha</CODE> - indicates whether alpha values are contained in			the <code>cmap</code> array<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 16<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>size</code> is less           than 1</DL></DD></DL><HR><A NAME="IndexColorModel(int, int, byte[], int, boolean, int)"><!-- --></A><H3>IndexColorModel</H3><PRE>public <B>IndexColorModel</B>(int&nbsp;bits,                       int&nbsp;size,                       byte[]&nbsp;cmap,                       int&nbsp;start,                       boolean&nbsp;hasalpha,                       int&nbsp;trans)</PRE><DL><DD>Constructs an <code>IndexColorModel</code> from a single array of  interleaved red, green, blue and optional alpha components.  The  specified transparent index represents a pixel that is considered entirely transparent regardless of any alpha value specified for it.  The array must have enough values in it to fill all of the needed component arrays of the specified size. The ColorSpace is the default sRGB space.  The transparency value is Transparency.TRANSLUCENT if <code>hasAlpha</code> is <code>true</code>; otherwise it is Transparency.BITMASK  if <code>trans</code> is a valid index into the colormap  (between 0 and size - 1) or Transparency.OPAQUE if <code>trans</code> is not a valid index.  The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT that can hold a single pixel.<DD><DL><DT><B>Parameters:</B><DD><CODE>bits</CODE> - the number of bits each pixel occupies<DD><CODE>size</CODE> - the size of the color component arrays<DD><CODE>cmap</CODE> - the array of color components<DD><CODE>start</CODE> - the starting offset of the first color component<DD><CODE>hasalpha</CODE> - indicates whether alpha values are contained in			the <code>cmap</code> array<DD><CODE>trans</CODE> - the index of the fully transparent pixel<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 16<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>size</code> is less than               1</DL></DD></DL><HR><A NAME="IndexColorModel(int, int, int[], int, boolean, int, int)"><!-- --></A><H3>IndexColorModel</H3><PRE>public <B>IndexColorModel</B>(int&nbsp;bits,                       int&nbsp;size,                       int[]&nbsp;cmap,                       int&nbsp;start,                       boolean&nbsp;hasalpha,                       int&nbsp;trans,                       int&nbsp;transferType)</PRE><DL><DD>Constructs an <code>IndexColorModel</code> from an array of  ints where each int is comprised of red, green, blue, and  optional alpha components in the default RGB color model format.   The specified transparent index represents a pixel that is considered entirely transparent regardless of any alpha value specified for it.  The array must have enough values in it to fill all of the needed component arrays of the specified size. The ColorSpace is the default sRGB space.  The transparency value is Transparency.TRANSLUCENT if <code>hasAlpha</code> is  <code>true</code>; otherwise it is Transparency.BITMASK if  <code>trans</code> is a valid index into the colormap  (between 0 and size - 1) or Transparency.OPAQUE if  <code>trans</code> is not a valid index.<DD><DL><DT><B>Parameters:</B><DD><CODE>bits</CODE> - the number of bits each pixel occupies<DD><CODE>size</CODE> - the size of the color component arrays<DD><CODE>cmap</CODE> - the array of color components<DD><CODE>start</CODE> - the starting offset of the first color component<DD><CODE>hasalpha</CODE> - indicates whether alpha values are contained in

⌨️ 快捷键说明

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