int bgRGB = bgcolor == null ? 0 : bgcolor.getRGB();
int srcRGB = 0, dstRGB = 0;
Object srcVal = null, dstVal = null;
if(comp instanceof AlphaComposite){
compType = AlphaCompositeMode;
AlphaComposite ac = (AlphaComposite) comp;
rule = ac.getRule();
srcConstAlpha = (int)(ac.getAlpha() * 255 + 0.5f);
}else if(comp instanceof XORComposite){
compType = XORMode;
XORComposite xor = (XORComposite) comp;
bgRGB = xor.getXORColor().getRGB();
}