I tested this on my Motorola Droid, and it worked as intended. However, I'm concerned that this might be a) terribly inefficient or b) not guaranteed to work on all Android phones.
/* Create a simple 100 by 100 bitmap */
Bitmap myBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
/* Create a canvas with which to draw on my bitmap */
Canvas myCanvas = new Canvas(myBitmap);
/* Draw a subset of my bitmap onto itself, with the source rectangle and destination rectangle overlapping */
Rect sourceRect = new Rect(10, 0, 99, 99);
Rect destRect = new Rect(0, 0, 89, 99);
myCanvas.drawBitmap(myBitmap, sourceRect, destRect, null);
As I said, this seemed to work fine in my testing, but when performing bit blits on other platforms, I haven't always been able to guarantee that it's safe, memory and performance-wise, to copy one grpahics region to another when the source and destinations intersect.
I'd welcome any insight into this.
Thank you,
Andy