比如:
public int filterRGB(int x,int y,int rgb){
DirectColorModel cm=(DirectColorModel)ColorModel.getRGBdefault();
int alpha=cm.getAlpha(rgb);
int red =cm.getRed(rgb);
int green=cm.getGreen(rgb);
int blue=cm.getBlue(rgb);
alpha=255*y/height;
return alpha<<24|red<<16|green<<8|blue;
}
public int filterRGB(int x, int y, int rgb) {
return ((rgb & 0xff00ff00)
| ((rgb & 0xff0000) >> 16)
| ((rgb & 0xff) << 16));
}
public int filterRGB(int x, int y, int rgb) {
DirectColorModel cm=(DirectColorModel)ColorModel.getRGBdefault();
return rgb & 0xffff0000;
}
其中的位运算是什么意思??
谢谢哪位大哥帮忙!
public int filterRGB(int x,int y,int rgb){
DirectColorModel cm=(DirectColorModel)ColorModel.getRGBdefault();
int alpha=cm.getAlpha(rgb);
int red =cm.getRed(rgb);
int green=cm.getGreen(rgb);
int blue=cm.getBlue(rgb);
alpha=255*y/height;
return alpha<<24|red<<16|green<<8|blue;
}
public int filterRGB(int x, int y, int rgb) {
return ((rgb & 0xff00ff00)
| ((rgb & 0xff0000) >> 16)
| ((rgb & 0xff) << 16));
}
public int filterRGB(int x, int y, int rgb) {
DirectColorModel cm=(DirectColorModel)ColorModel.getRGBdefault();
return rgb & 0xffff0000;
}
其中的位运算是什么意思??
谢谢哪位大哥帮忙!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货