text drawing tools refactoring