I am developing app i have 1 Functionality like This I have done this by This code
Now i want to save the erased bitmap to save
Actually i have a bitmap loaded in canvas
Now i am trying to Erase the bitmap like this
And when user press save then only this must output this is my OnDraw method
protected void onDraw(Canvas canvas) {
canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint);
c2.drawBitmap(Bitmap2, 0, 0, mBitmapPaint);
canvas.drawBitmap(Transparent, 0, 0, null);
// c2.drawBitmap(mBitmap, 0, 0, mBitmapPaint);
for (PathPoints p : paths) {
mPaint.setColor(p.getColor());
Log.v("", "Color code : " + p.getColor());
if (p.isTextToDraw()) {
canvas.drawText(p.textToDraw, p.x, p.y, mPaint);
} else {
// if(isTouched)
c2.drawPath(p.getPath(), mPaint);
}
}
}
And onsave Button i have done
Bitmap editedImage = Bitmap.createBitmap(drawView
.getDrawingCache());
editedImage = Bitmap.createScaledBitmap(editedImage, 200, 300,
true);
But this gives me only the full image(First screen shot) You can see my entire Code