java命名空间java.awt.image类componentcolormodel的类成员方法:
getnormalizedcomponents定义及介绍
本文导语:
getnormalizedcomponents
public float[] getnormalizedcomponents(object pixel,
float[] normcomponents,
int normoffset)
返回已在 colormodel 中给定了像素的标准化形式颜色/alpha 分量的数组。像素...
getnormalizedcomponents
public float[] getnormalizedcomponents(object pixel,
float[] normcomponents,
int normoffset)
- 返回已在
colormodel 中给定了像素的标准化形式颜色/alpha 分量的数组。像素值由作为对象引用传入的类型 transfertype 的数据元素的数组指定。如果像素不为类型 transfertype 的基本数组,则抛出 null
iis7站长之家。如果 pixel 不是特别大,不能保存此 colormodel 的像素值,则抛出 arrayindexoutofboundsexception。标准化分量为 float 值,这些值介于此 colormodel 的 colorspace 对象指定的每个分量的最小值和最大值之间。如果 normcomponents 数组为 null,则分配一个新数组。normcomponents 数组将返回。颜色/alpha 分量存储在以 normoffset 开头的 normcomponents 数组中,即使此方法已分配了数组也如此。如果 normcomponents 数组不为 null,且不是特别大,不能保存所有颜色和 alpha 分量(以 normoffset 开头),则抛出 arrayindexoutofboundsexception。
如果某子类旨在以非默认方式将像素样本值转换为颜色分量值,则该子类必须重写此方法。此类实现的默认转换在类的注释中描述。实现非默认转换的任何子类都必须遵循对此处定义的允许转换的限制。
- 覆盖:
- 类
colormodel 中的 getnormalizedcomponents
- 参数:
pixel - 指定像素normcomponents - 检索标准化分量的数组normoffset - 在其处开始存储标准化分量的 normcomponents 数组的偏移量
- 返回:
- 包含标准化颜色和 alpha 分量的数组。
- 抛出:
classcastexception - 如果 pixel 不为类型 transfertype 的基本数组
arrayindexoutofboundsexception - 如果 normcomponents 不是特别大,不能保存以 normoffset 开头的所有颜色和 alpha 分量
arrayindexoutofboundsexception - 如果 pixel 不是特别大,不能保存此 colormodel 的像素值。- 从以下版本开始:
- 1.4