/**
* Returns the color model associated with this configuration that
* supports the specified transparency.
*/
public ColorModel getColorModel(int transparency) {
if (model.getTransparency() == transparency) {
return model;
}
switch (transparency) {
case Transparency.OPAQUE:
return new DirectColorModel(24, 0xff0000, 0xff00, 0xff);
case Transparency.BITMASK:
return new DirectColorModel(25, 0xff0000, 0xff00, 0xff, 0x1000000);
case Transparency.TRANSLUCENT:
return ColorModel.getRGBdefault();
default:
return null;
}
}
BufferedImageGraphicsConfig.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:jdk8u-jdk
作者:
评论列表
文章目录