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

Method connect

lib/matplotlib/patches.py:3051–3066  ·  view source on GitHub ↗
(self, posA, posB)

Source from the content-addressed store, hash-verified

3049 self.angleB = angleB
3050
3051 def connect(self, posA, posB):
3052 x1, y1 = posA
3053 x2, y2 = posB
3054
3055 cosA = math.cos(math.radians(self.angleA))
3056 sinA = math.sin(math.radians(self.angleA))
3057 cosB = math.cos(math.radians(self.angleB))
3058 sinB = math.sin(math.radians(self.angleB))
3059
3060 cx, cy = get_intersection(x1, y1, cosA, sinA,
3061 x2, y2, cosB, sinB)
3062
3063 vertices = [(x1, y1), (cx, cy), (x2, y2)]
3064 codes = [Path.MOVETO, Path.CURVE3, Path.CURVE3]
3065
3066 return Path(vertices, codes)
3067
3068 @_register_style(_style_list)
3069 class Angle(_Base):

Callers

nothing calls this directly

Calls 2

get_intersectionFunction · 0.85
PathClass · 0.85

Tested by

no test coverage detected