()
| 982 | |
| 983 | |
| 984 | def test_transformed_path(): |
| 985 | points = [(0, 0), (1, 0), (1, 1), (0, 1)] |
| 986 | path = Path(points, closed=True) |
| 987 | |
| 988 | trans = mtransforms.Affine2D() |
| 989 | trans_path = mtransforms.TransformedPath(path, trans) |
| 990 | assert_allclose(trans_path.get_fully_transformed_path().vertices, points) |
| 991 | |
| 992 | # Changing the transform should change the result. |
| 993 | r2 = 1 / np.sqrt(2) |
| 994 | trans.rotate(np.pi / 4) |
| 995 | assert_allclose(trans_path.get_fully_transformed_path().vertices, |
| 996 | [(0, 0), (r2, r2), (0, 2 * r2), (-r2, r2)], |
| 997 | atol=1e-15) |
| 998 | |
| 999 | |
| 1000 | def test_transformed_patch_path(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…