java命名空间java.awt.image类colormodel的类成员方法:
getalpha定义及介绍
本文导语:
getalpha
public int getalpha(object indata)
返回指定像素(在 0 到 255 之间缩放)的 alpha 分量。像素值由作为对象引用传入的类型 transfertype 的数据元素的数组指定。如果 indata 不为类型 transfertype 的基本数组,则抛出 classcastexception。...
getalpha
public int getalpha(object indata)
- 返回指定像素(在 0 到 255 之间缩放)的 alpha 分量。像素值由作为对象引用传入的类型 transfertype 的数据元素的数组指定。如果 indata 不为类型 transfertype 的基本数组,则抛出
classcastexception。如果 indata 不是特别大,不能存储此 colormodel 的像素值,则抛出 arrayindexoutofboundsexception。如果此 transfertype 不受支持,则抛出 unsupportedoperationexception。因为 colormodel 为抽象类,所以任何实例必须是子类的实例。子类可以继承此方法的实现,并且如果子类未重写此方法,则在该子类使用除 databuffer.type_byte、databuffer.type_ushort 或 databuffer.type_int 之外的 transfertype 时,此方法将抛出异常。
- 参数:
indata - 指定的像素
- 返回:
- 指定像素(从 0 到 255 缩放)的 alpha 分量。
- 抛出:
classcastexception - 如果 indata 不为类型 transfertype 的基本数组
arrayindexoutofboundsexception - 如果 indata 不是特别大,不能存储此 colormodel 的像素值
unsupportedoperationexception - 如果此 tranfertype 不受此 colormodel 支持