java命名空间java.awt.image类componentcolormodel的类成员方法:
getunnormalizedcomponents定义及介绍
本文导语:
getunnormalizedcomponents
public int[] getunnormalizedcomponents(float[] normcomponents,
int normoffset,
int[] components,
int offset)
在已给定标准化分量数组的情...
getunnormalizedcomponents
public int[] getunnormalizedcomponents(float[] normcomponents,
int normoffset,
int[] components,
int offset)
- 在已给定标准化分量数组的情况下,返回以非标准化形式存在的所有颜色/alpha 分量的数组。非标准化分量为 0 和 2n - 1 之间的无符号整数值,其中 n 为特定分量的位数。标准化分量为 float 值,这些值介于此
colormodel 的 colorspace 对象指定的每个分量的最小值和最大值之间。如果此 colormodel 的颜色分量值不便于用非标准化形式表示,则抛出 illegalargumentexception。如果 components 数组为 null,则分配一个新数组。components 数组将返回。将颜色/alpha 分量存储在以 offset 开头的 components 数组中,即便此方法已分配了数组也是如此。如果 components 数组不为 null 且不是特别大,不能以 offset 开头保存所有颜色和 alpha 分量,则抛出 arrayindexoutofboundsexception。如果 normcomponents 数组不是特别大,不能保存以 normoffset 开头的所有颜色和 alpha 分量,则抛出 illegalargumentexception。
- 覆盖:
- 类
colormodel 中的 getunnormalizedcomponents
- 参数:
normcomponents - 包含标准化分量的数组normoffset - 开始检索标准化分量的 normcomponents 数组的偏移量components - 从 normcomponents 检索分量的数组offset - 在其处开始存储 normcomponents 的 components 的索引
- 返回:
- 包含非标准化颜色和 alpha 分量的数组。
- 抛出:
illegalargumentexception - 如果此 componentcolormodel 不支持非标准化形式
illegalargumentexception - 如果 normcomponents 的长度减去 normoffset 小于 numcomponents