當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。