I am devolping an android app where in a user can paint using touch screen. I have created my custom class where in I am overriding ondraw() and implemented on touch listener the code looks like this
@Override
protected void onDraw(Canvas canvas){
canvas.drawBitmap(canvasBitmap, 0, 0,canvasPaint);
canvas.drawPath(drawPath, drawPaint);
}
//register user touches as drawing action
@Override
public boolean onTouchEvent(MotionEvent event)
{
float touchX=event.getX();
float touchY=event.getY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
drawPath.moveTo(touchX, touchY);
break;
case MotionEvent.ACTION_MOVE:
drawPath.lineTo(touchX, touchY);
break;
case MotionEvent.ACTION_UP:
drawCanvas.drawPath(drawPath,drawPaint);
drawPath.reset();
break;
default:
return false;
}
invalidate();
return true;
}
Every thing working fine but now I want to check continuously the drawing area to see if all the pixel are colored but not white and when all pixels are colored I would like to give message to user how do I do it I am stuck.. Please help