当前位置: 首页>>代码示例>>Java>>正文


Java DirectColorModel.getNumComponents方法代码示例

本文整理汇总了Java中java.awt.image.DirectColorModel.getNumComponents方法的典型用法代码示例。如果您正苦于以下问题:Java DirectColorModel.getNumComponents方法的具体用法?Java DirectColorModel.getNumComponents怎么用?Java DirectColorModel.getNumComponents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.image.DirectColorModel的用法示例。


在下文中一共展示了DirectColorModel.getNumComponents方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isRgbColorModel

import java.awt.image.DirectColorModel; //导入方法依赖的package包/类
private static boolean isRgbColorModel(ColorModel cm) {
    if (cm instanceof DirectColorModel &&
            cm.getTransferType() == DataBuffer.TYPE_INT) {
        DirectColorModel directCM = (DirectColorModel) cm;

        return directCM.getRedMask() == 0x00FF0000 &&
                directCM.getGreenMask() == 0x0000FF00 &&
                directCM.getBlueMask() == 0x000000FF &&
                (directCM.getNumComponents() == 3 ||
                        directCM.getAlphaMask() == 0xFF000000);
    }

    return false;
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:15,代码来源:BlendComposite.java

示例2: isBgrColorModel

import java.awt.image.DirectColorModel; //导入方法依赖的package包/类
private static boolean isBgrColorModel(ColorModel cm) {
    if (cm instanceof DirectColorModel &&
            cm.getTransferType() == DataBuffer.TYPE_INT) {
        DirectColorModel directCM = (DirectColorModel) cm;

        return directCM.getRedMask() == 0x000000FF &&
                directCM.getGreenMask() == 0x0000FF00 &&
                directCM.getBlueMask() == 0x00FF0000 &&
                (directCM.getNumComponents() == 3 ||
                        directCM.getAlphaMask() == 0xFF000000);
    }

    return false;
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:15,代码来源:BlendComposite.java

示例3: isRgbColorModel

import java.awt.image.DirectColorModel; //导入方法依赖的package包/类
private static boolean isRgbColorModel(ColorModel cm) {
    if (cm instanceof DirectColorModel &&
            cm.getTransferType() == DataBuffer.TYPE_INT) {
        DirectColorModel directCM = (DirectColorModel) cm;

        return directCM.getRedMask() == 0x00FF0000 &&
               directCM.getGreenMask() == 0x0000FF00 &&
               directCM.getBlueMask() == 0x000000FF &&
               (directCM.getNumComponents() == 3 ||
                directCM.getAlphaMask() == 0xFF000000);
    }

    return false;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:15,代码来源:BlendComposite.java

示例4: isBgrColorModel

import java.awt.image.DirectColorModel; //导入方法依赖的package包/类
private static boolean isBgrColorModel(ColorModel cm) {
    if (cm instanceof DirectColorModel &&
            cm.getTransferType() == DataBuffer.TYPE_INT) {
        DirectColorModel directCM = (DirectColorModel) cm;

        return directCM.getRedMask() == 0x000000FF &&
               directCM.getGreenMask() == 0x0000FF00 &&
               directCM.getBlueMask() == 0x00FF0000 &&
               (directCM.getNumComponents() == 3 ||
                directCM.getAlphaMask() == 0xFF000000);
    }

    return false;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:15,代码来源:BlendComposite.java

示例5: checkComponentsOrder

import java.awt.image.DirectColorModel; //导入方法依赖的package包/类
private static boolean checkComponentsOrder(ColorModel cm) {
    if (cm instanceof DirectColorModel &&
            cm.getTransferType() == DataBuffer.TYPE_INT) {
        DirectColorModel directCM = (DirectColorModel) cm;
        
        return directCM.getRedMask() == 0x00FF0000 &&
               directCM.getGreenMask() == 0x0000FF00 &&
               directCM.getBlueMask() == 0x000000FF &&
               (directCM.getNumComponents() != 4 ||
                directCM.getAlphaMask() == 0xFF000000);
    }
    
    return false;
}
 
开发者ID:romainguy,项目名称:filthy-rich-clients,代码行数:15,代码来源:BlendComposite.java

示例6: checkComponentsOrder

import java.awt.image.DirectColorModel; //导入方法依赖的package包/类
private static boolean checkComponentsOrder(ColorModel cm) {
    if (cm instanceof DirectColorModel
            && cm.getTransferType() == DataBuffer.TYPE_INT) {
        DirectColorModel directCM = (DirectColorModel) cm;

        return directCM.getRedMask() == 0x00FF0000
                && directCM.getGreenMask() == 0x0000FF00
                && directCM.getBlueMask() == 0x000000FF
                && (directCM.getNumComponents() != 4
                || directCM.getAlphaMask() == 0xFF000000);
    }

    return false;
}
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:15,代码来源:BlendComposite.java


注:本文中的java.awt.image.DirectColorModel.getNumComponents方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。