BufferedImageGraphicsConfig.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:OpenJSharp 作者:
/**
 * 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;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号