i have a view where i override the onDraw-method to get a compass-bitmap with the needle showing in a calculated direction on screen. Compass and needle are png-images and i use matrix.setRotate-Method to transform both bitmaps according to orientation of the device and the calculated direction for the needle.
Till now i transform the compass-image, draw it, then transform the needle-image and draw it afterwards. Now i realised that i could merge both bitmaps into one bitmap and draw it at once.
How can i do this programmaticaly? Is it possible to take A-bitmap and B-bitmap of same size and merge them to a bitmap C, so that it looks like B is on top of A?
I hope my explanation of the problem is understandable. If not, please let me know.
Thanks in advance,