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

Method transmute

lib/matplotlib/patches.py:4011–4031  ·  view source on GitHub ↗
(self, path, mutation_size, linewidth)

Source from the content-addressed store, hash-verified

4009 super().__init__()
4010
4011 def transmute(self, path, mutation_size, linewidth):
4012 # docstring inherited
4013 x0, y0, x1, y1, x2, y2 = self.ensure_quadratic_bezier(path)
4014
4015 arrow_path = [(x0, y0), (x1, y1), (x2, y2)]
4016 b_plus, b_minus = make_wedged_bezier2(
4017 arrow_path,
4018 self.tail_width * mutation_size / 2.,
4019 wm=self.shrink_factor)
4020
4021 patch_path = [(Path.MOVETO, b_plus[0]),
4022 (Path.CURVE3, b_plus[1]),
4023 (Path.CURVE3, b_plus[2]),
4024 (Path.LINETO, b_minus[2]),
4025 (Path.CURVE3, b_minus[1]),
4026 (Path.CURVE3, b_minus[0]),
4027 (Path.CLOSEPOLY, b_minus[0]),
4028 ]
4029 path = Path([p for c, p in patch_path], [c for c, p in patch_path])
4030
4031 return path, True
4032
4033
4034class FancyBboxPatch(Patch):

Callers

nothing calls this directly

Calls 3

make_wedged_bezier2Function · 0.85
PathClass · 0.85

Tested by

no test coverage detected