public interface PaintContext
PaintContext
接口定义了封装和优化环境生成的彩色图案在填充或描边操作装置上的空间
Graphics2D
。的
PaintContext
提供
Graphics2D
在
ColorModel
相关
Raster
形式运行所需的颜色,
PaintContext
保持一个特定的油漆作业状态。在多线程环境下,几种情况下可以同时为一个单一的
Paint
对象存在。
Paint
Modifier and Type | Method and Description |
---|---|
void |
dispose()
释放分配给操作的资源。
|
ColorModel |
getColorModel()
返回输出的
ColorModel 。
|
Raster |
getRaster(int x, int y, int w, int h)
返回一个
Raster 含有颜色的图形操作产生。
|
void dispose()
ColorModel getColorModel()
ColorModel
。请注意,这
ColorModel
可能不同于在
Paint
的
createContext
方法指定的提示。不是所有的
PaintContext
物体在任意
ColorModel
能够产生颜色的图案。
ColorModel
。
Raster getRaster(int x, int y, int w, int h)
Raster
含有颜色的图形操作产生。
x
的x坐标的区域空间的颜色产生装置。
y
-设备空间的颜色区域的y坐标生成。
w
-设备空间的区域的宽度
h
-设备空间区域的高度
Raster
表示指定的矩形区域,包含颜色的图形操作产生。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.