I have a bunch of bitmap images that I draw on a canvas used with 2D transformation (android.graphics.Camera and android.graphics.Matrix). How to get sizes / positions of raster images on canvas? The size will be the borders of the bitmap displayed on the canvas, and the position will be the coordinates of the top / left corner of the borders. All bitmaps are regular rectangles without an alpha channel.
For this purpose, the matrix class has a function mapRect:
mapRect
mapRect(RectF dst, RectF src) Apply this matrix to the src rectangle, and write the transformed rectangle into dst.
( 0,0 x, y, ), dst.