'Return a copy of the text with new lines added, so that
the text is wrapped relative to the parent figure.'

def _get_wrapped_text(self):

    if self.get_usetex():
        return self.get_text()
    line_width = self._get_wrap_line_width()
    wrapped_str = u''
    line = u''
    for word in self.get_text().split(u'    '):
        sub_words = word.split(u'\n')
        for i in range(len(sub_words)):
            current_width = self._get_rendered_text_width(((line + u'    ') + sub_words[i]))
            if ((current_width > line_width) or (i > 0)):
                wrapped_str += (line + u'\n')
                line = u''
            if (line == u''):
                line = sub_words[i]
            else:
                line += (u'    ' + sub_words[i])
    return (wrapped_str + line)
