|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface ImageConsumer
对通过 ImageProducer 接口的图像数据感兴趣的对象接口。将一个使用者添加到图像生产者时,生产者会使用此接口中定义的方法调用传递所有关于图像的数据。
ImageProducer| 字段摘要 | |
|---|---|
static int |
COMPLETESCANLINES
按照一次(多个)完整扫描行的方式传递像素。 |
static int |
IMAGEABORTED
图像创建进程被故意中止。 |
static int |
IMAGEERROR
生成图像时遇到错误。 |
static int |
RANDOMPIXELORDER
按随机顺序传递像素。 |
static int |
SINGLEFRAME
该图像包含单幅静态图像。 |
static int |
SINGLEFRAMEDONE
图像的某一帧已完成,但还有更多的帧要传递。 |
static int |
SINGLEPASS
以单通道的方式传递像素。 |
static int |
STATICIMAGEDONE
图像已完成,不再有像素或帧要传递。 |
static int |
TOPDOWNLEFTRIGHT
按从上到下、从左到右的顺序传递像素。 |
| 方法摘要 | |
|---|---|
void |
imageComplete(int status)
当 ImageProducer 已完成源图像所含所有像素的传递时,或者已完成多帧动画的单个帧时,或者加载或生成图像中出现错误时,就调用 imageComplete 方法。 |
void |
setColorModel(ColorModel model)
设置用于大多数像素的 ColorModel 对象,这些像素使用 setPixels 方法调用进行报告。 |
void |
setDimensions(int width,
int height)
使用 setDimensions 方法调用报告源图像尺寸。 |
void |
setHints(int hintflags)
设置 ImageConsumer 用于处理 ImageProducer 所传递像素的提示。 |
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int off,
int scansize)
一次或多次调用此方法来传递图像的像素。 |
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int off,
int scansize)
一次或多次调用 setPixels 方法来传递图像的像素。 |
void |
setProperties(Hashtable<?,?> props)
设置与此图像关联的可扩展属性列表。 |
| 字段详细信息 |
|---|
static final int RANDOMPIXELORDER
setHints(int),
常量字段值static final int TOPDOWNLEFTRIGHT
setHints(int),
常量字段值static final int COMPLETESCANLINES
setHints(int),
常量字段值static final int SINGLEPASS
setHints(int),
常量字段值static final int SINGLEFRAME
setHints(int),
imageComplete(int),
常量字段值static final int IMAGEERROR
imageComplete(int),
常量字段值static final int SINGLEFRAMEDONE
imageComplete(int),
常量字段值static final int STATICIMAGEDONE
imageComplete(int),
常量字段值static final int IMAGEABORTED
imageComplete(int),
常量字段值| 方法详细信息 |
|---|
void setDimensions(int width,
int height)
width - 源图像的宽度height - 源图像的高度void setProperties(Hashtable<?,?> props)
props - 要与此图像关联的属性列表void setColorModel(ColorModel model)
model - 指定的 ColorModelColorModelvoid setHints(int hintflags)
hintflags - ImageConsumer 用于处理像素的提示集合
void setPixels(int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int off,
int scansize)
x - 要设置的像素区域左上角的 X 坐标y - 要设置的像素区域左上角的 Y 坐标w - 像素区域的宽度h - 像素区域的高度model - 指定的 ColorModelpixels - 像素数组off - pixels 数组中的偏移量scansize - pixels 数组中一行像素到下一行的距离ColorModel
void setPixels(int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int off,
int scansize)
x - 要设置的像素区域左上角的 X 坐标y - 要设置的像素区域左上角的 Y 坐标w - 像素区域的宽度h - 像素区域的高度model - 指定的 ColorModelpixels - 像素数组off - pixels 数组中的偏移量scansize - pixels 数组中一行像素到下一行的距离ColorModelvoid imageComplete(int status)
status - 图像加载的状态ImageProducer.removeConsumer(java.awt.image.ImageConsumer)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。