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)
| 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 | """ |
no test coverage detected