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

Method _clip

lib/matplotlib/patches.py:2951–2969  ·  view source on GitHub ↗

Clip *path* at its start by the region where *in_start* returns True, and at its stop by the region where *in_stop* returns True. The original path is assumed to start in the *in_start* region and to stop in the *in_stop* region.

(self, path, in_start, in_stop)

Source from the content-addressed store, hash-verified

2949 SimpleNamespace(x=xy[0], y=xy[1]))[0]
2950
2951 def _clip(self, path, in_start, in_stop):
2952 """
2953 Clip *path* at its start by the region where *in_start* returns
2954 True, and at its stop by the region where *in_stop* returns True.
2955
2956 The original path is assumed to start in the *in_start* region and
2957 to stop in the *in_stop* region.
2958 """
2959 if in_start:
2960 try:
2961 _, path = split_path_inout(path, in_start)
2962 except ValueError:
2963 pass
2964 if in_stop:
2965 try:
2966 path, _ = split_path_inout(path, in_stop)
2967 except ValueError:
2968 pass
2969 return path
2970
2971 def __call__(self, posA, posB,
2972 shrinkA=2., shrinkB=2., patchA=None, patchB=None):

Callers 1

__call__Method · 0.95

Calls 1

split_path_inoutFunction · 0.85

Tested by

no test coverage detected