java命名空间java.awt.image类componentcolormodel的类成员方法:
getcomponents定义及介绍
本文导语:
getcomponents
public int[] getcomponents(int pixel,
int[] components,
int offset)
返回在 colormodel 中已给定像素的非标准化颜色/alpha 分量。如果此 colormodel 的分量值不便于以非标准化形式表示,则返回 ...
getcomponents
public int[] getcomponents(int pixel,
int[] components,
int offset)
- 返回在
colormodel 中已给定像素的非标准化颜色/alpha 分量。如果此 colormodel 的分量值不便于以非标准化形式表示,则返回 illegalargumentexception。将颜色/alpha 分量存储在以 offset 开头的 components 数组中,即便此方法已分配了数组也是如此。
- 覆盖:
- 类
colormodel 中的 getcomponents
- 参数:
pixel - 指定为整数的像素值。components - 在其中存储非标准化颜色/alpha 分量的整数数组。如果 components 数组为 null,则分配新数组。offset - components 数组的偏移量。
- 返回:
- 分量数组。
- 抛出:
illegalargumentexception - 如果此 colormodel 中有一个以上的分量。
illegalargumentexception - 如果此 colormodel 不支持非标准化形式
arrayindexoutofboundsexception - 如果 components 数组不为 null 且不是特别大,不能保存所有颜色和 alpha 分量(以偏移量开头)。