MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / draw

Method draw

lib/matplotlib/patches.py:4641–4660  ·  view source on GitHub ↗
(self, renderer)

Source from the content-addressed store, hash-verified

4639 return _path, fillable
4640
4641 def draw(self, renderer):
4642 if not self.get_visible():
4643 return
4644
4645 # FIXME: dpi_cor is for the dpi-dependency of the linewidth. There
4646 # could be room for improvement. Maybe _get_path_in_displaycoord could
4647 # take a renderer argument, but get_path should be adapted too.
4648 self._dpi_cor = renderer.points_to_pixels(1.)
4649 path, fillable = self._get_path_in_displaycoord()
4650
4651 if not np.iterable(fillable):
4652 path = [path]
4653 fillable = [fillable]
4654
4655 affine = transforms.IdentityTransform()
4656
4657 self._draw_paths_with_artist_properties(
4658 renderer,
4659 [(p, affine, self._facecolor if f and self._facecolor[3] else None)
4660 for p, f in zip(path, fillable)])
4661
4662
4663class ConnectionPatch(FancyArrowPatch):

Callers

nothing calls this directly

Calls 4

get_visibleMethod · 0.45
points_to_pixelsMethod · 0.45

Tested by

no test coverage detected