In my opinion, I have a big rectangle, the rectangle can move. When the rectangle moves to some place, I want to draw an image in the center of a large rectangle. My question is that I cannot put the center of the image in the center of the rectangle. I used:
canvas.drawBitmap(rotatedBitmap, matrix, paint) canvas.drawBitmap(rotatedBitmap, left, top, paint)
but I canβt find canvas.drawBitmap (rotatedBitmap, centerX, centerY, paint), so I want to use a matrix, but the matrix also moves the image to the left and top, and not from the center, can you give a hint to draw a pic in the center of the rectangle?
source share