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

📄 directcolormodel.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
 The returned value is a non pre-multiplied value.  Thus, if the alpha is premultiplied, this method divides it out before returning the value.  If the alpha value is 0, for example, the green value is 0.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getGreen(int)">getGreen</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>pixel</CODE> - the specified pixel<DT><B>Returns:</B><DD>the green color component for the specified pixel, from          0 to 255 in the sRGB <code>ColorSpace</code>.</DL></DD></DL><HR><A NAME="getBlue(int)"><!-- --></A><H3>getBlue</H3><PRE>public final int <B>getBlue</B>(int&nbsp;pixel)</PRE><DL><DD>Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB <code>ColorSpace</code>, sRGB.  A  color conversion is done if necessary.  The pixel value is specified as an <code>int</code>. The returned value is a non pre-multiplied value.  Thus, if the alpha is premultiplied, this method divides it out before returning the value.  If the alpha value is 0, for example, the blue value is 0.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getBlue(int)">getBlue</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>pixel</CODE> - the specified pixel<DT><B>Returns:</B><DD>the blue color component for the specified pixel, from          0 to 255 in the sRGB <code>ColorSpace</code>.</DL></DD></DL><HR><A NAME="getAlpha(int)"><!-- --></A><H3>getAlpha</H3><PRE>public final int <B>getAlpha</B>(int&nbsp;pixel)</PRE><DL><DD>Returns the alpha component for the specified pixel, scaled from 0 to 255.  The pixel value is specified as an <code>int</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getAlpha(int)">getAlpha</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>pixel</CODE> - the specified pixel<DT><B>Returns:</B><DD>the value of the alpha component of <code>pixel</code>         from 0 to 255.</DL></DD></DL><HR><A NAME="getRGB(int)"><!-- --></A><H3>getRGB</H3><PRE>public final int <B>getRGB</B>(int&nbsp;pixel)</PRE><DL><DD>Returns the color/alpha components of the pixel in the default RGB color model format.  A color conversion is done if necessary. The pixel value is specified as an <code>int</code>. The returned value is in a non pre-multiplied format.  Thus, if the alpha is premultiplied, this method divides it out of the color components.  If the alpha value is 0, for example, the color  values are each 0.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getRGB(int)">getRGB</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>pixel</CODE> - the specified pixel<DT><B>Returns:</B><DD>the RGB value of the color/alpha components of the specified         pixel.<DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html#getRGBdefault()"><CODE>ColorModel.getRGBdefault()</CODE></A></DL></DD></DL><HR><A NAME="getRed(java.lang.Object)"><!-- --></A><H3>getRed</H3><PRE>public int <B>getRed</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</PRE><DL><DD>Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB <code>ColorSpace</code>, sRGB.  A  color conversion is done if necessary.  The pixel value is specified by an array of data elements of type <code>transferType</code> passed  in as an object reference. The returned value is a non pre-multiplied value.  Thus, if the alpha is premultiplied, this method divides it out before returning the value.  If the alpha value is 0, for example, the red value  is 0. If <code>inData</code> is not a primitive array of type  <code>transferType</code>, a <code>ClassCastException</code> is  thrown.  An <code>ArrayIndexOutOfBoundsException</code> is thrown if <code>inData</code> is not large enough to hold a pixel value for this <code>ColorModel</code>.  Since <code>DirectColorModel</code> can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported <code>transferType</code>. An <code>UnsupportedOperationException</code> is thrown if this <code>transferType</code> is not supported by this  <code>ColorModel</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getRed(java.lang.Object)">getRed</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>inData</CODE> - the array containing the pixel value<DT><B>Returns:</B><DD>the value of the red component of the specified pixel.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if <code>inData</code> is not         large enough to hold a pixel value for this color model<DD><CODE><A HREF="../../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <code>inData</code> is not a          primitive array of type <code>transferType</code><DD><CODE><A HREF="../../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - if this <code>transferType</code>         is not supported by this color model</DL></DD></DL><HR><A NAME="getGreen(java.lang.Object)"><!-- --></A><H3>getGreen</H3><PRE>public int <B>getGreen</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</PRE><DL><DD>Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB <code>ColorSpace</code>, sRGB.  A  color conversion is done if necessary.  The pixel value is specified by an array of data elements of type <code>transferType</code> passed  in as an object reference. The returned value is a non pre-multiplied value.  Thus, if the alpha is premultiplied, this method divides it out before returning the value.  If the alpha value is 0, for example, the green value  is 0.  If <code>inData</code> is not a primitive array of type <code>transferType</code>, a <code>ClassCastException</code> is thrown.  An <code>ArrayIndexOutOfBoundsException</code> is thrown if <code>inData</code> is not large enough to hold a pixel value for this <code>ColorModel</code>.  Since <code>DirectColorModel</code> can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported <code>transferType</code>. An <code>UnsupportedOperationException</code> is thrown if this <code>transferType</code> is not supported by this  <code>ColorModel</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getGreen(java.lang.Object)">getGreen</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>inData</CODE> - the array containing the pixel value<DT><B>Returns:</B><DD>the value of the green component of the specified pixel.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if <code>inData</code> is not         large enough to hold a pixel value for this color model<DD><CODE><A HREF="../../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <code>inData</code> is not a          primitive array of type <code>transferType</code><DD><CODE><A HREF="../../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - if this <code>transferType</code>         is not supported by this color model</DL></DD></DL><HR><A NAME="getBlue(java.lang.Object)"><!-- --></A><H3>getBlue</H3><PRE>public int <B>getBlue</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</PRE><DL><DD>Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB <code>ColorSpace</code>, sRGB.  A  color conversion is done if necessary.  The pixel value is specified by an array of data elements of type <code>transferType</code> passed  in as an object reference. The returned value is a non pre-multiplied value.  Thus, if the alpha is premultiplied, this method divides it out before returning the value.  If the alpha value is 0, for example, the blue value  is 0.  If <code>inData</code> is not a primitive array of type <code>transferType</code>, a <code>ClassCastException</code> is thrown.  An <code>ArrayIndexOutOfBoundsException</code> is thrown if <code>inData</code> is not large enough to hold a pixel value for this <code>ColorModel</code>.  Since <code>DirectColorModel</code> can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported <code>transferType</code>. An <code>UnsupportedOperationException</code> is thrown if this <code>transferType</code> is not supported by this  <code>ColorModel</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getBlue(java.lang.Object)">getBlue</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>inData</CODE> - the array containing the pixel value<DT><B>Returns:</B><DD>the value of the blue component of the specified pixel.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if <code>inData</code> is not         large enough to hold a pixel value for this color model<DD><CODE><A HREF="../../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <code>inData</code> is not a          primitive array of type <code>transferType</code><DD><CODE><A HREF="../../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - if this <code>transferType</code>         is not supported by this color model</DL></DD></DL><HR><A NAME="getAlpha(java.lang.Object)"><!-- --></A><H3>getAlpha</H3><PRE>public int <B>getAlpha</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</PRE><DL><DD>Returns the alpha component for the specified pixel, scaled from 0 to 255.  The pixel value is specified by an array of data elements of type <code>transferType</code> passed in as an object reference. If <code>inData</code> is not a primitive array of type  <code>transferType</code>, a <code>ClassCastException</code> is  thrown.  An <code>ArrayIndexOutOfBoundsException</code> is thrown if <code>inData</code> is not large enough to hold a pixel value for this <code>ColorModel</code>.  Since <code>DirectColorModel</code> can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported <code>transferType</code>. If this <code>transferType</code> is not supported, an <code>UnsupportedOperationException</code> is thrown.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/image/ColorModel.html#getAlpha(java.lang.Object)">getAlpha</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>inData</CODE> - the specified pixel<DT><B>Returns:</B><DD>the alpha component of the specified pixel, scaled from         0 to 255.<DT><B>Throws:</B><DD><CODE><code>ClassCastException</code></CODE> - if <code>inData</code> 	is not a primitive array of type <code>transferType</code><DD><CODE><code>ArrayIndexOutOfBoundsException</code></CODE> - if	<code>inData</code> is not large enough to hold a pixel value	for this <code>ColorModel</code><DD><CODE><code>UnsupportedOperationException</code></CODE> - if this	<code>tranferType</code> is not supported by this	<code>ColorModel</code></DL></DD></DL><HR><A NAME="getRGB(java.lang.Object)"><!-- --></A><H3>getRGB</H3><PRE>public int <B>getRGB</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;inData)</PRE><DL><DD>Returns the color/alpha components for the specified pixel in the default RGB color model format.  A color conversion is done if necessary.  The pixel value is specified by an array of data elements of type <code>transferType</code> passed in as an object reference.  If <code>inData</code> is not a primitive array of type <code>transferType</code>, a <code>ClassCastException</code> is  thrown.  An <code>ArrayIndexOutOfBoundsException</code> is thrown if <code>inData</code> is not large enough to hold a pixel value for this <code>ColorModel</code>. The returned value is in a non pre-multiplied format.  Thus, if the alpha is premultiplied, this method divides it out of the

⌨️ 快捷键说明

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