我准备了自定义视图代码,
if (myBitmap == null) {
myBitmap = Bitmap.createBitmap(290, 330, Bitmap.Config.ARGB_8888);
bmpCanvas = new Canvas(myBitmap);
intArray = new int[myBitmap.getWidth()
* myBitmap.getHeight()];
}
if (bmpCanvas != null) {
bmpCanvas.drawText("C", 80,280, mPaintAlphabet);
bmpCanvas.drawText("C", 80,280, mAlphaInner);
}
myBitmap.getPixels(intArray, 0, 290, 0, 0, 290, 330);
if (myBitmap != null)
canvas.drawBitmap(myBitmap, 0, 0, null);
这里intArray有总像素,有些像素有color.i收集单独数组中的总颜色像素。请让我知道我可以通过彩色像素对特定图像进行动作吗?