It's not clear if you want to do this dynamically (in response to user actions) or whether you want to generate a fixed image based on specified drag/zoom/rotate parameters. For the former, you should go with a custom View, where you can do all your own drawing in onDraw()
. For the latter, you can do this with the Bitmap class. You don't need any views. Follow these steps:
- Create a destination Bitmap of the size you want.
- create a Canvas, passing the destination Bitmap to the constructor. That will create a Canvas that will draw into the destination Bitmap.
- Create a Paint object for drawing.
- Draw your first source image using the Canvas.
- Draw the overlay image after applying the appropriate transformations to the Paint object.
Later, you can use the Bitmap in an ImageView or other view class that accepts images (e.g., TextView).