It is not clear whether you want to do this dynamically (in response to user actions) or want to create a fixed image based on the specified drag / zoom / rotate options. For the first you have to go with a custom view where you can do all your own drawing in onDraw() . For the latter, you can do this using the Bitmap class. You do not need any views. Follow these steps:
- Create a destination bitmap of the desired size.
- create a canvas by passing the target bitmap to the constructor. This will create a canvas that will draw into the destination bitmap.
- Create a Paint object to draw.
- Draw your first source image with Canvas.
- Draw an overlay image after applying the appropriate transformations to the Paint object.
Later, you can use Bitmap in an ImageView or other view class that accepts images (e.g. TextView).
source share