|if the background is static, you really only need to draw the overlay at its new position and then draw the parts of the background that were uncovered when the overlay moved. there's no need to redraw the whole background.
1. the overlay's previous rect = R1.
2. the overlay's new rect = R2.
3. R3 = the bounding rect of R1 and R2.
4. alloc a bitmap of size R3
5. fill it with the appropriate chunk of background
6. draw the overlay into the temp bitmap
7. draw the temp bitmap to the screen
as long as the overlay is moving only a few pixels at a time, R3 should be just slightly bigger than the overlay size. if R1 and R2 don't instersect, you can split it into two operations: restore the background to one rect, then draw the overlay into the other - don't bother with the temp bitmap.