public class BufferedImage extends Image implements WritableRenderedImage, Transparency
BufferedImage
类描述了一个
Image
与访问图像数据缓冲区。一个
BufferedImage
是由一个
ColorModel
和
Raster
图像数据。在
Raster
的
SampleModel
数量和类型的乐队必须匹配的数量和类型的
ColorModel
要求代表它的颜色和alpha分量。所有的
BufferedImage
对象的左上角坐标(0, 0)。任何
Raster
用来构建一个
BufferedImage
必须有X = 0和迷你= 0。
这类依赖于数据的读取和Raster
设置方法,并对ColorModel
颜色表征方法。
ColorModel
,
Raster
,
WritableRaster
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_3BYTE_BGR
代表8位RGB分量图像,对应一个Windows风格BGR颜色模型)与蓝色、绿色、红色3个字节存储。
|
static int |
TYPE_4BYTE_ABGR
代表8位RGBA颜色成分的蓝色、绿色和红色的图像,存储在3字节和1字节的α。
|
static int |
TYPE_4BYTE_ABGR_PRE
代表8位RGBA颜色成分的蓝色、绿色和红色的图像,存储在3字节和1字节的α。
|
static int |
TYPE_BYTE_BINARY
表示一个不透明的字节填充的1,2,或4位图像。
|
static int |
TYPE_BYTE_GRAY
表示一个无符号字节的灰度图像,无索引。
|
static int |
TYPE_BYTE_INDEXED
表示一个索引字节图像。
|
static int |
TYPE_CUSTOM
图像类型是不被识别的,所以它必须是一个自定义的图像。
|
static int |
TYPE_INT_ARGB
代表8位RGBA颜色组件包装成整数像素的图像。
|
static int |
TYPE_INT_ARGB_PRE
代表8位RGBA颜色组件包装成整数像素的图像。
|
static int |
TYPE_INT_BGR
代表8位RGB分量图像,对应于Windows或Solaris式BGR颜色模型,用蓝色、绿色和红色包装成整数像素。
|
static int |
TYPE_INT_RGB
代表8位RGB分量包装成整数像素的图像。
|
static int |
TYPE_USHORT_555_RGB
代表5-5-5 RGB分量图像(五位红、五位绿色,五位蓝色)没有α。
|
static int |
TYPE_USHORT_565_RGB
代表5-6-5 RGB分量图像(五位红,六位绿色,五位蓝色)没有α。
|
static int |
TYPE_USHORT_GRAY
表示一个无符号的短灰度图像,非索引的。
|
accelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
BITMASK, OPAQUE, TRANSLUCENT
Constructor and Description |
---|
BufferedImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable<?,?> properties)
构建了一种新的
BufferedImage 与指定的
ColorModel 和
Raster 。
|
BufferedImage(int width, int height, int imageType)
构建了一个
BufferedImage 一个预定义的图像类型。
|
BufferedImage(int width, int height, int imageType, IndexColorModel cm)
构建了一个
BufferedImage 的一个预定义的图像类型:type_byte_binary或type_byte_indexed。
|
Modifier and Type | Method and Description |
---|---|
void |
addTileObserver(TileObserver to)
添加一个瓷砖观察者。
|
void |
coerceData(boolean isAlphaPremultiplied)
军队的数据匹配在
isAlphaPremultiplied 变量指定的国家。
|
WritableRaster |
copyData(WritableRaster outRaster)
计算的
BufferedImage 任意矩形区域并将其复制到指定的
WritableRaster 。
|
Graphics2D |
createGraphics()
创建一个
Graphics2D ,可画成这
BufferedImage 。
|
WritableRaster |
getAlphaRaster()
返回一个
WritableRaster 代表与
ColorModel 对象支持一个单独的空间
BufferedImage 对象的Alpha通道Alpha通道,如
ComponentColorModel 和
DirectColorModel 。
|
ColorModel |
getColorModel()
返回
ColorModel 。
|
Raster |
getData()
返回图像作为一个大的瓷砖。
|
Raster |
getData(Rectangle rect)
计算并返回的
BufferedImage 任意区域。
|
Graphics |
getGraphics()
此方法返回一个
Graphics2D ,但在这里是为了向后兼容。
|
int |
getHeight()
返回的
BufferedImage 高度。
|
int |
getHeight(ImageObserver observer)
返回的
BufferedImage 高度。
|
int |
getMinTileX()
返回x方向上的最小瓦片索引。
|
int |
getMinTileY()
返回Y方向上的最小瓦片索引。
|
int |
getMinX()
返回最小的x坐标本
BufferedImage 。
|
int |
getMinY()
返回该
BufferedImage 最小y坐标。
|
int |
getNumXTiles()
返回x方向上的瓷砖的数量。
|
int |
getNumYTiles()
返回Y方向上的瓷砖的数量。
|
Object |
getProperty(String name)
返回图像的属性的名称。
|
Object |
getProperty(String name, ImageObserver observer)
返回图像的属性的名称。
|
String[] |
getPropertyNames()
返回的名字
getProperty(String) 或
null 公认的数组,如果没有财产的名字是公认的。
|
WritableRaster |
getRaster()
返回
WritableRaster 。
|
int |
getRGB(int x, int y)
返回默认的RGB颜色模型的整数像素(type_int_argb)和默认的sRGB色彩空间。
|
int[] |
getRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
返回一个数组,在默认的RGB颜色模型的整数像素(type_int_argb)和默认的sRGB色彩空间,从图像数据的一部分。
|
SampleModel |
getSampleModel()
返回与此相关的
SampleModel
BufferedImage 。
|
ImageProducer |
getSource()
返回产生图像的像素的对象。
|
Vector<RenderedImage> |
getSources()
|
BufferedImage |
getSubimage(int x, int y, int w, int h)
返回由指定的矩形区域图像。
|
Raster |
getTile(int tileX, int tileY)
返回瓦(
tileX ,
tileY )。
|
int |
getTileGridXOffset()
返回x的平铺网格相对于原点,偏移为例,对瓷砖的位置的x坐标(0, 0)。
|
int |
getTileGridYOffset()
返回Y网格相对于原点,偏移为例,对瓷砖的位置的y坐标(0, 0)。
|
int |
getTileHeight()
返回像素的瓷砖高度。
|
int |
getTileWidth()
返回像素的瓷砖宽度。
|
int |
getTransparency()
返回透明度。
|
int |
getType()
返回图像类型。
|
int |
getWidth()
返回的
BufferedImage 宽度。
|
int |
getWidth(ImageObserver observer)
返回的
BufferedImage 宽度。
|
WritableRaster |
getWritableTile(int tileX, int tileY)
检查瓷砖的书写。
|
Point[] |
getWritableTileIndices()
返回
Point 对象指示瓦检查写数组。
|
boolean |
hasTileWriters()
返回是否有任何瓷砖进行了书面检查。
|
boolean |
isAlphaPremultiplied()
返回是否已进行α。
|
boolean |
isTileWritable(int tileX, int tileY)
返回当前是否正在检查是否写入了一个瓷砖。
|
void |
releaseWritableTile(int tileX, int tileY)
放弃写权限瓦。
|
void |
removeTileObserver(TileObserver to)
移除瓷砖观察者。
|
void |
setData(Raster r)
图像的一个矩形区域设置为指定的
Raster
r 内容,这被认为是在同一个坐标空间的
BufferedImage 。
|
void |
setRGB(int x, int y, int rgb)
设置指定的RGB值在这
BufferedImage 像素。
|
void |
setRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
数组在默认的RGB颜色模型的整数像素(type_int_argb)和默认的sRGB色彩空间,为图像数据的一部分。
|
String |
toString()
返回一个
String 表示这
BufferedImage 对象及其价值。
|
flush, getAccelerationPriority, getCapabilities, getScaledInstance, setAccelerationPriority
public static final int TYPE_CUSTOM
public static final int TYPE_INT_RGB
DirectColorModel
无α。当数据与非不透明的阿尔法存储在这种类型的图像,颜色数据必须被调整到一个非规则形式和阿尔法丢弃,在
AlphaComposite
文档描述。
public static final int TYPE_INT_ARGB
DirectColorModel
α。在图像中的颜色数据是不规则的α。当这类作为一个
BufferedImage
构造函数的
imageType
参数,创建的图像与图像在JDK1.1创建和更早的版本一致。
public static final int TYPE_INT_ARGB_PRE
DirectColorModel
α。在图像中的颜色数据是进行α。
public static final int TYPE_INT_BGR
DirectColorModel
。当数据与非不透明的阿尔法存储在这种类型的图像,颜色数据必须被调整到一个非规则形式和阿尔法丢弃,在
AlphaComposite
文档描述。
public static final int TYPE_3BYTE_BGR
ComponentColorModel
。当数据与非不透明的阿尔法存储在这种类型的图像,颜色数据必须被调整到一个非规则形式和阿尔法丢弃,在
AlphaComposite
文档描述。
public static final int TYPE_4BYTE_ABGR
ComponentColorModel
α。在图像中的颜色数据是不规则的α。字节数据是在一个单一的字节数组中的顺序A,B,G,R从低到更高的字节地址在每个像素。
public static final int TYPE_4BYTE_ABGR_PRE
ComponentColorModel
α。在图像中的颜色数据是进行α。字节数据是在一个单一的字节数组中的顺序A,B,G,R从低到更高的字节地址在每个像素。
public static final int TYPE_USHORT_565_RGB
DirectColorModel
。当数据与非不透明的阿尔法存储在这种类型的图像,颜色数据必须被调整到一个非规则形式和阿尔法丢弃,在
AlphaComposite
文档描述。
public static final int TYPE_USHORT_555_RGB
DirectColorModel
。当数据与非不透明的阿尔法存储在这种类型的图像,颜色数据必须被调整到一个非规则形式和阿尔法丢弃,在
AlphaComposite
文档描述。
public static final int TYPE_BYTE_GRAY
ColorSpace
ComponentColorModel
。当数据与非不透明的阿尔法存储在这种类型的图像,颜色数据必须被调整到一个非规则形式和阿尔法丢弃,在
AlphaComposite
文档描述。
public static final int TYPE_USHORT_GRAY
ColorSpace
ComponentColorModel
。当数据与非不透明的阿尔法存储在这种类型的图像,颜色数据必须被调整到一个非规则形式和阿尔法丢弃,在
AlphaComposite
文档描述。
public static final int TYPE_BYTE_BINARY
IndexColorModel
无α。当这种类型作为参数的构造函数,
imageType
BufferedImage
以
imageType
论点但没有
ColorModel
的说法,一位形象与默认的sRGB色彩
ColorSpace
两
IndexColorModel
创建:{ 0,0 }和 0, { 255,255 } 255, 。
2或4位每像素可以被构造通过BufferedImage
构造函数需要一个ColorModel
争论提供了一个ColorModel
与适当的Map大小的图像。
每像素8位的图像应该使用图像类型TYPE_BYTE_INDEXED
或TYPE_BYTE_GRAY
取决于他们的ColorModel
。
颜色当数据储存在这种类型的图像,在色度图的颜色最接近的是由IndexColorModel
和由此产生的索引存储。近似和α或颜色成分的损失结果,根据颜色的IndexColorModel
映象。
public static final int TYPE_BYTE_INDEXED
imageType
BufferedImage
以
imageType
论点但没有
ColorModel
的说法,一个
IndexColorModel
创建一个256色的6 / 6 / 6 216-255由灰度值在默认的sRGB色彩空间的色彩与剩下的颜色立方体的调色板。
颜色当数据储存在这种类型的图像,在色度图的颜色最接近的是由IndexColorModel
和由此产生的索引存储。近似和α或颜色成分的损失结果,根据颜色的IndexColorModel
映象。
public BufferedImage(int width, int height, int imageType)
BufferedImage
一个预定义的图像类型。对于图像的
ColorSpace
是默认的sRGB空间。
width
-创建图像宽度
height
-创建图像高度
imageType
-创建的图像类型
ColorSpace
,
TYPE_INT_RGB
,
TYPE_INT_ARGB
,
TYPE_INT_ARGB_PRE
,
TYPE_INT_BGR
,
TYPE_3BYTE_BGR
,
TYPE_4BYTE_ABGR
,
TYPE_4BYTE_ABGR_PRE
,
TYPE_BYTE_GRAY
,
TYPE_USHORT_GRAY
,
TYPE_BYTE_BINARY
,
TYPE_BYTE_INDEXED
,
TYPE_USHORT_565_RGB
,
TYPE_USHORT_555_RGB
public BufferedImage(int width, int height, int imageType, IndexColorModel cm)
BufferedImage
的一个预定义的图像类型:type_byte_binary或type_byte_indexed。
如果图像类型type_byte_binary,颜色模型中的项的数量来确定图像是否应该有1,2,或4位/像素。如果颜色模型有1个或2个条目,图像将有1位每像素。如果它有3个或4个条目,图像有2位每像素。如果它有在5和16之间的条目,图像将有4位每像素。否则,将抛出一个时。
width
-创建图像宽度
height
-创建图像高度
imageType
-创建的图像类型
cm
-创建的图像
IndexColorModel
IllegalArgumentException
如果图像类型是不type_byte_binary或type_byte_indexed或者图像类型是type_byte_binary和彩色Map已超过16个。
TYPE_BYTE_BINARY
,
TYPE_BYTE_INDEXED
public BufferedImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable<?,?> properties)
ColorModel
和
Raster
新
BufferedImage
。如果在
Raster
的
SampleModel
数量和类型的乐队不匹配的
ColorModel
要求代表它的颜色和alpha组件的数量和类型,一个
RasterFormatException
抛出。这种方法可以乘或除的颜色
Raster
数据由α在
ColorModel
的
alphaPremultiplied
状态匹配。这
BufferedImage
特性可以通过在一个
Hashtable
的
String
/
Object
对建立。
cm
-新形象
ColorModel
raster
-图像数据
Raster
isRasterPremultiplied
-如果
true
,在栅格数据已经进行α。
properties
-
Hashtable
的
String
/
Object
对。
RasterFormatException
-如果在
Raster
的
SampleModel
数量和类型的乐队不匹配的数量和类型的
ColorModel
要求代表它的颜色和alpha分量。
IllegalArgumentException
-如果
raster
格格不入的
cm
ColorModel
,
Raster
,
WritableRaster
public int getType()
BufferedImage
图像类型。
TYPE_INT_RGB
,
TYPE_INT_ARGB
,
TYPE_INT_ARGB_PRE
,
TYPE_INT_BGR
,
TYPE_3BYTE_BGR
,
TYPE_4BYTE_ABGR
,
TYPE_4BYTE_ABGR_PRE
,
TYPE_BYTE_GRAY
,
TYPE_BYTE_BINARY
,
TYPE_BYTE_INDEXED
,
TYPE_USHORT_GRAY
,
TYPE_USHORT_565_RGB
,
TYPE_USHORT_555_RGB
,
TYPE_CUSTOM
public ColorModel getColorModel()
ColorModel
。
getColorModel
接口
RenderedImage
BufferedImage
的
ColorModel
。
public WritableRaster getRaster()
WritableRaster
。
BufferedImage
的
WriteableRaster
。
public WritableRaster getAlphaRaster()
WritableRaster
代表与
ColorModel
对象支持一个单独的空间
BufferedImage
对象的Alpha通道Alpha通道,如
ComponentColorModel
和
DirectColorModel
。返回
null
如果没有alpha通道在图像与
ColorModel
相关。这种方法假设所有其他比
IndexColorModel
对象
ColorModel
,如果
ColorModel
支持alpha,有单独的Alpha通道存储的图像数据,最后乐队。如果图像使用
IndexColorModel
,查找表中的α,此方法返回
null
由于没有空间离散的alpha通道。此方法创建一个新的
WritableRaster
,但股价数据阵列。
WritableRaster
或
null
如果这
BufferedImage
没有alpha通道,其
ColorModel
相关。
public int getRGB(int x, int y)
ColorModel
。有在返回的数据每个颜色分量,使用这种方法时,只有8位精度。
一个ArrayOutOfBoundsException
可能如果坐标不界抛出。然而,明确的界限检查是没有保证。
x
- x坐标的像素在默认的RGB颜色模型和sRGB色彩空间的像素
y
-从像素在默认的RGB颜色模型和sRGB色彩空间的像素点的Y坐标
setRGB(int, int, int)
,
setRGB(int, int, int, int, int[], int, int)
public int[] getRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
ColorModel
。有在返回的数据每个颜色分量,使用这种方法时,只有8位精度。用指定的坐标(X,Y )在图像中,像素的ARGB可以这样访问:
像素= rgbarray [偏移+(y-starty)* scansize +(x-startx)];
一个ArrayOutOfBoundsException
可能如果区域并不在界抛出。然而,明确的界限检查是没有保证。
startX
-启动X坐标
startY
-起始Y坐标
w
宽度的区域
h
高度区域
rgbArray
-如果不是
null
,RGB像素都写在这里
offset
到
rgbArray
偏移
scansize
-线跨越的
rgbArray
setRGB(int, int, int)
,
setRGB(int, int, int, int, int[], int, int)
public void setRGB(int x, int y, int rgb)
BufferedImage
像素。像素是在默认的RGB颜色模型,type_int_argb,和默认的sRGB色彩空间。对于一个
IndexColorModel
图像,与最近的色指数选择。
一个ArrayOutOfBoundsException
可能如果坐标不界抛出。然而,明确的界限检查是没有保证。
x
的x坐标的像素设置
y
-像素设置y坐标
rgb
的RGB值
getRGB(int, int)
,
getRGB(int, int, int, int, int[], int, int)
public void setRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
ColorModel
。有在返回的数据每个颜色分量,使用这种方法时,只有8位精度。用指定的坐标(X,Y )在这个图像中,像素的ARGB可以这样访问:
像素= rgbarray [偏移+(y-starty)* scansize +(x-startx)];警告:无抖动发生。
一个ArrayOutOfBoundsException
可能如果区域并不在界抛出。然而,明确的界限检查是没有保证。
startX
-启动X坐标
startY
-起始Y坐标
w
区域的宽度
h
区域的高度
rgbArray
的RGB像素
offset
到
rgbArray
偏移
scansize
-线跨越的
rgbArray
getRGB(int, int)
,
getRGB(int, int, int, int, int[], int, int)
public int getWidth()
BufferedImage
宽度。
getWidth
接口
RenderedImage
BufferedImage
宽度
public int getHeight()
BufferedImage
高度。
getHeight
接口
RenderedImage
BufferedImage
高度
public int getWidth(ImageObserver observer)
BufferedImage
宽度。
getWidth
方法重写,继承类
Image
observer
忽略
BufferedImage
宽度
Image.getHeight(java.awt.image.ImageObserver)
,
ImageObserver
public int getHeight(ImageObserver observer)
BufferedImage
高度。
getHeight
方法重写,继承类
Image
observer
忽略
BufferedImage
高度
Image.getWidth(java.awt.image.ImageObserver)
,
ImageObserver
public ImageProducer getSource()
getSource
方法重写,继承类
Image
ImageProducer
是用来产生像素的图像。
ImageProducer
public Object getProperty(String name, ImageObserver observer)
UndefinedProperty
场。如果这个图像的性质尚不清楚,那么这个方法返回
null
和
ImageObserver
对象通知。属性名称“注释”应用于存储可提交给用户的可选注释,作为对图像、其源或其作者的描述的描述。
getProperty
方法重写,继承类
Image
name
-属性名称
observer
,接收关于图像信息通知
ImageObserver
Object
属性所指定的
name
或
null
如果这个图像的性质尚不清楚。
NullPointerException
-如果属性名是空的。
ImageObserver
,
Image.UndefinedProperty
public Object getProperty(String name)
getProperty
接口
RenderedImage
name
-属性名称
Object
属性所指定的
name
。
NullPointerException
-如果属性名是空的。
Image.UndefinedProperty
public Graphics getGraphics()
getGraphics
方法重写,继承类
Image
Graphics2D
,可画成这个形象。
Graphics
,
Component.createImage(int, int)
public Graphics2D createGraphics()
Graphics2D
,可画成这
BufferedImage
。
Graphics2D
,用于绘制到这个形象。
public BufferedImage getSubimage(int x, int y, int w, int h)
BufferedImage
共享相同的数据阵列作为原始图像。
x
-指定的矩形区域左上角的x坐标
y
-指定的矩形区域的左上角的Y坐标
w
-指定的矩形区域的宽度
h
-指定矩形区域的高度
BufferedImage
是这个
BufferedImage
子图像。
RasterFormatException
-如果指定的区域不包含在这
BufferedImage
。
public boolean isAlphaPremultiplied()
false
如果没有α。
true
如果阿尔法已经进行
false
否则。
public void coerceData(boolean isAlphaPremultiplied)
isAlphaPremultiplied
变量指定的国家。它可以乘或除以彩色栅格数据的阿尔法,或什么都不做,如果数据是在正确的状态。
isAlphaPremultiplied
-
true
如果阿尔法已经进行
false
否则。
public String toString()
String
表示这
BufferedImage
对象及其价值。
public Vector<RenderedImage> getSources()
Vector
RenderedImage
的直接来源,没有这些直接来源的来源,对这
BufferedImage
图像数据。此方法返回
null
如果
BufferedImage
没有关于其直接来源的信息。它返回一个空
Vector
如果
BufferedImage
没有直接的来源。
getSources
接口
RenderedImage
Vector
包含此
BufferedImage
对象的图像数据直接来源,或
null
如果这
BufferedImage
没有关于其直接来源的信息,或一个空的
Vector
如果这
BufferedImage
没有直接的来源。
public String[] getPropertyNames()
getProperty(String)
或
null
公认的数组,如果没有财产的名字是公认的。
getPropertyNames
接口
RenderedImage
getProperty(String)
承认
String
阵列;或
null
如果没有属性名称是公认的。
public int getMinX()
BufferedImage
。这总是为零。
getMinX
接口
RenderedImage
BufferedImage
。
public int getMinY()
BufferedImage
最小y坐标。这始终是零。
getMinY
接口
RenderedImage
BufferedImage
最小y坐标。
public SampleModel getSampleModel()
SampleModel
BufferedImage
。
getSampleModel
接口
RenderedImage
BufferedImage
的
SampleModel
。
public int getNumXTiles()
getNumXTiles
接口
RenderedImage
public int getNumYTiles()
getNumYTiles
接口
RenderedImage
public int getMinTileX()
getMinTileX
接口
RenderedImage
public int getMinTileY()
getMinTileY
接口
RenderedImage
public int getTileWidth()
getTileWidth
接口
RenderedImage
public int getTileHeight()
getTileHeight
接口
RenderedImage
public int getTileGridXOffset()
getTileGridXOffset
接口
RenderedImage
public int getTileGridYOffset()
getTileGridYOffset
接口
RenderedImage
public Raster getTile(int tileX, int tileY)
tileX
,
tileY
)。注意,
tileX
和
tileY
指数为瓷砖阵列像素位置,不。的
Raster
,还是活的,这意味着它被更新,如果改变图像。
getTile
接口
RenderedImage
tileX
-要求的瓷砖在瓷砖阵列X指数
tileY
-要求的瓷砖在瓷砖阵列Y指数
Raster
是由参数定义
tileX
和
tileY
瓦。
ArrayIndexOutOfBoundsException
-如果
tileX
和
tileY
不等于0
public Raster getData()
Raster
返回的是一个副本的图像数据不更新,如果改变图像。
getData
接口
RenderedImage
Raster
拷贝图像数据。
setData(Raster)
public Raster getData(Rectangle rect)
BufferedImage
任意区域。
Raster
返回的是一个副本的图像数据并没有更新如果改变图像。
getData
接口
RenderedImage
rect
的
BufferedImage
要返回的地区。
Raster
,是一份对
BufferedImage
指定区域的图像数据
setData(Raster)
public WritableRaster copyData(WritableRaster outRaster)
BufferedImage
任意矩形区域并将其复制到指定的
WritableRaster
。该区域将计算机从指定的
WritableRaster
边界确定。指定的
WritableRaster
必须
SampleModel
,这个图像兼容。如果
outRaster
是
null
,适当的
WritableRaster
创建。
copyData
接口
RenderedImage
outRaster
-
WritableRaster
抱回来的图像的一部分,或
null
WritableRaster
。
public void setData(Raster r)
Raster
r
内容,这被认为是在同一个坐标空间的
BufferedImage
。操作上的
BufferedImage
界限。
setData
接口
WritableRenderedImage
r
-指定
Raster
getData()
,
getData(Rectangle)
public void addTileObserver(TileObserver to)
addTileObserver
接口
WritableRenderedImage
to
-指定
TileObserver
public void removeTileObserver(TileObserver to)
removeTileObserver
接口
WritableRenderedImage
to
-指定
TileObserver
。
public boolean isTileWritable(int tileX, int tileY)
isTileWritable
接口
WritableRenderedImage
tileX
-瓦X指数。
tileY
-瓦Y指数。
true
如果由指定索引指定的瓷砖被检查出来的
false
否则写作。
ArrayIndexOutOfBoundsException
-如果
tileX
和
tileY
不等于0
public Point[] getWritableTileIndices()
Point
对象指示瓦检查写数组。返回
null
如果没有检查出来。
getWritableTileIndices
接口
WritableRenderedImage
Point
阵列表明进行了写作的瓷砖,或
null
如果没有砖进行了写作。
public boolean hasTileWriters()
(getwritabletileindices()!=零)。
hasTileWriters
接口
WritableRenderedImage
true
如果瓦检查书写;
false
否则。
public WritableRaster getWritableTile(int tileX, int tileY)
TileObservers
时通知瓦从没有作家有一个作家。
getWritableTile
接口
WritableRenderedImage
tileX
-瓦X指数
tileY
-瓦Y指数
WritableRaster
瓦,由指定的指标表明,被检查的写作。
public void releaseWritableTile(int tileX, int tileY)
getWritableTile(int, int)
其他导致未定义的结果。所有注册
TileObservers
时通知瓦是从一个作家没有作家。
releaseWritableTile
接口
WritableRenderedImage
tileX
-瓦X指数
tileY
-瓦Y指数
public int getTransparency()
getTransparency
接口
Transparency
BufferedImage
透明度。
Transparency.OPAQUE
,
Transparency.BITMASK
,
Transparency.TRANSLUCENT
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.