ColorImageView
ColorImageView copied to clipboard
貌似我是第一个发言哒!颜色填充错误鸟~~~
如果给了边界颜色,就会全屏填充颜色,如果不给则填充的颜色锯齿很大。 我做了一些修改,在填充白色区域还可以(不需要写入边界颜色)
//override by swifty if pixel is white then fill
private boolean needFillPixel(int[] pixels, int pixel, int index) {
if (hasBorderColor) {
return pixels[index] != mBorderColor;
} else {
// return pixels[index] == pixel;
return pixels[index] > 0xFFBBBBBB ? true : false;
}
}
暂时没想到其他好的办法~~~
此外我突然灵光一闪,这个这么好玩,为何不做一个应用玩玩,于是自己弄了一个app,地址在这里: https://github.com/wsk900906/FillColor 来一起玩玩呗~~