Draw the :class:`Annotation` object to the given *renderer*.
(self, renderer)
| 2367 | |
| 2368 | @artist.allow_rasterization |
| 2369 | def draw(self, renderer): |
| 2370 | """ |
| 2371 | Draw the :class:`Annotation` object to the given *renderer*. |
| 2372 | """ |
| 2373 | |
| 2374 | if renderer is not None: |
| 2375 | self._renderer = renderer |
| 2376 | if not self.get_visible(): |
| 2377 | return |
| 2378 | |
| 2379 | xy_pixel = self._get_position_xy(renderer) |
| 2380 | if not self._check_xy(renderer, xy_pixel): |
| 2381 | return |
| 2382 | |
| 2383 | self._update_position_xytext(renderer, xy_pixel) |
| 2384 | self.update_bbox_position_size(renderer) |
| 2385 | |
| 2386 | if self.arrow_patch is not None: # FancyArrowPatch |
| 2387 | if self.arrow_patch.figure is None and self.figure is not None: |
| 2388 | self.arrow_patch.figure = self.figure |
| 2389 | self.arrow_patch.draw(renderer) |
| 2390 | |
| 2391 | # Draw text, including FancyBboxPatch, after FancyArrowPatch. |
| 2392 | # Otherwise, a wedge arrowstyle can land partly on top of the Bbox. |
| 2393 | Text.draw(self, renderer) |
| 2394 | |
| 2395 | def get_window_extent(self, renderer=None): |
| 2396 | """ |
nothing calls this directly
no test coverage detected