Moved draw code to the TextImpl class