java命名空间java.awt.image类componentsamplemodel的类成员方法:
componentsamplemodel定义及介绍
本文导语:
componentsamplemodel
public componentsamplemodel(int datatype,
int w,
int h,
int pixelstride,
int scanlinestride,
int[] bankindices,
...
componentsamplemodel
public componentsamplemodel(int datatype,
int w,
int h,
int pixelstride,
int scanlinestride,
int[] bankindices,
int[] bandoffsets)
- 构造具有指定参数的 componentsamplemodel。band 数量将由 bandoffsets 数组的长度给定。不同的 band 可以存储在 databuffer 的不同存储单元中。
- 参数:
datatype - 存储样本的数据类型w - 描述的图像数据区域的宽度(以像素为单位)h - 描述的图像数据区域的高度(以像素为单位)pixelstride - 描述的图像数据区域的像素间距scanlinestride - 描述的图像数据区域的行间距bankindices - 所有 band 的存储单元索引bandoffsets - 所有 band 的 band 偏移量
- 抛出:
illegalargumentexception - 如果 w 或 h 不大于 0
illegalargumentexception - 如果 pixelstride 小于 0
illegalargumentexception - 如果 scanlinestride 小于 0
illegalargumentexception - 如果 bankindices 的长度不等于 bankoffsets 的长度
illegalargumentexception - 如果 bandindices 的 band 索引中任何一项小于 0
illegalargumentexception - 如果 datatype 不是受支持的数据类型之一
createcompatiblesamplemodel
public samplemodel createcompatiblesamplemodel(int w,
int h)
- 创建具有指定宽度和高度的
componentsamplemodel。新的 samplemodel 将有与此 samplemodel 相同的 band 数量、存储数据类型、交错方案和像素间距。
- 指定者:
- 类
samplemodel 中的 createcompatiblesamplemodel
- 参数:
w - 得到的 samplemodel 的宽度h - 得到的 samplemodel 的高度
- 返回:
- 具有指定大小的
componentsamplemodel
- 抛出:
illegalargumentexception - 如果 w 或 h 不大于 0