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

Method _recompute_path

lib/matplotlib/patches.py:2047–2060  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2045 .transform(verts)
2046
2047 def _recompute_path(self):
2048 # circular arc
2049 arc = Path.arc(0, 360)
2050
2051 # annulus needs to draw an outer ring
2052 # followed by a reversed and scaled inner ring
2053 a, b, w = self.a, self.b, self.width
2054 v1 = self._transform_verts(arc.vertices, a, b)
2055 v2 = self._transform_verts(arc.vertices[::-1], a - w, b - w)
2056 v = np.vstack([v1, v2, v1[0, :], (0, 0)])
2057 c = np.hstack([arc.codes, Path.MOVETO,
2058 arc.codes[1:], Path.MOVETO,
2059 Path.CLOSEPOLY])
2060 self._path = Path(v, c)
2061
2062 def get_path(self):
2063 if self._path is None:

Callers 1

get_pathMethod · 0.95

Calls 3

_transform_vertsMethod · 0.95
PathClass · 0.85
arcMethod · 0.80

Tested by

no test coverage detected