I need to draw text on 2 consecutive bitmaps that form a single continues bitmap.
- The text can begin on the first bitmap and end on the second bitmap.
- A letter can begin on the first bitmap but end on the second bitmap.
I can draw the text in full twice using a negative offset on the second bitmap
//first bitmap
canvas1.drawText(text, position, top, paint);
//second bitmap
canvas2.drawText(text, -lengthOfTextOnFirstBitmap, top, paint);
Seems like the wrong way to address the issue, I would like to support n bitmaps and I'm looking for a better solution.
Any thoughts?
Just translate the canvas so that you draw in the same "place", but the canvas is positioned just to the right of the first canvas. This should make a pixel-perfect text rendering.