moved drawTextToBitmap() in its own class