java命名空间java.awt.image类componentcolormodel的类成员方法:
getrgb定义及介绍
本文导语:
getrgb
public int getrgb(object indata)
返回默认的 rgb 颜色模型格式中的像素的颜色/alpha 分量。如有必要,可进行颜色转换。像素值由作为一个对象引用而传入的 transfertype 类型的数据元素数组指定。返回的值是非预乘格式。如果与 a...
getrgb
public int getrgb(object indata)
- 返回默认的 rgb 颜色模型格式中的像素的颜色/alpha 分量。如有必要,可进行颜色转换。像素值由作为一个对象引用而传入的
transfertype 类型的数据元素数组指定。返回的值是非预乘格式。如果与 alpha 预先相乘,此方法会将其从颜色分量(如果 alpha 值为 0,则颜色值为 0)中除出来。因为 componentcolormodel 可以子类化,所以子类可以继承此方法的实现,并且如果不重写此方法,则当它们使用不受支持的 transfertype 时,将抛出异常。
- 覆盖:
- 类
colormodel 中的 getrgb
- 参数:
indata - 要从中获取颜色/alpha 分量(由类型 transfertype 的数据元素的数组指定)的像素。
- 返回:
- 指定像素(int 类型)的颜色/alpha 分量。
- 抛出:
classcastexception - 如果 indata 不为类型 transfertype 的基本数组。
arrayindexoutofboundsexception - 如果 indata 不是特别大,不能保存此 colormodel 的像素值。
unsupportedoperationexception - 如果此 componentcolormodel 的传输类型不为以下受支持的传输类型之一:databuffer.type_byte、databuffer.type_ushort、databuffer.type_int、databuffer.type_short、databuffer.type_float 或 databuffer.type_double。- 另请参见:
colormodel.getrgbdefault()