(self, gc, x, y, s, prop, angle, ismath=False, mtext=None)
| 1279 | writer.end('g') |
| 1280 | |
| 1281 | def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): |
| 1282 | # docstring inherited |
| 1283 | |
| 1284 | clip_attrs = self._get_clip_attrs(gc) |
| 1285 | if clip_attrs: |
| 1286 | # Cannot apply clip-path directly to the text, because |
| 1287 | # it has a transformation |
| 1288 | self.writer.start('g', **clip_attrs) |
| 1289 | |
| 1290 | if gc.get_url() is not None: |
| 1291 | self.writer.start('a', {'xlink:href': gc.get_url(), 'target': '_blank'}) |
| 1292 | |
| 1293 | if mpl.rcParams['svg.fonttype'] == 'path': |
| 1294 | self._draw_text_as_path(gc, x, y, s, prop, angle, ismath, mtext) |
| 1295 | else: |
| 1296 | self._draw_text_as_text(gc, x, y, s, prop, angle, ismath, mtext) |
| 1297 | |
| 1298 | if gc.get_url() is not None: |
| 1299 | self.writer.end('a') |
| 1300 | |
| 1301 | if clip_attrs: |
| 1302 | self.writer.end('g') |
| 1303 | |
| 1304 | def flipy(self): |
| 1305 | # docstring inherited |
nothing calls this directly
no test coverage detected