MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / contains_point

Method contains_point

site-packages/matplotlib/path.py:470–488  ·  view source on GitHub ↗

Returns whether the (closed) path contains the given point. If *transform* is not ``None``, the path will be transformed before performing the test. *radius* allows the path to be made slightly larger or smaller.

(self, point, transform=None, radius=0.0)

Source from the content-addressed store, hash-verified

468 self._interpolation_steps)
469
470 def contains_point(self, point, transform=None, radius=0.0):
471 """
472 Returns whether the (closed) path contains the given point.
473
474 If *transform* is not ``None``, the path will be transformed before
475 performing the test.
476
477 *radius* allows the path to be made slightly larger or smaller.
478 """
479 if transform is not None:
480 transform = transform.frozen()
481 # `point_in_path` does not handle nonlinear transforms, so we
482 # transform the path ourselves. If `transform` is affine, letting
483 # `point_in_path` handle the transform avoids allocating an extra
484 # buffer.
485 if transform and not transform.is_affine:
486 self = transform.transform_path(self)
487 transform = None
488 return _path.point_in_path(point[0], point[1], radius, self, transform)
489
490 def contains_points(self, points, transform=None, radius=0.0):
491 """

Callers 2

inside_polyFunction · 0.95
_check_xyMethod · 0.45

Calls 2

frozenMethod · 0.45
transform_pathMethod · 0.45

Tested by

no test coverage detected