A `TransformedPatchPath` caches a non-affine transformed copy of the `~.patches.Patch`. This cached copy is automatically updated when the non-affine part of the transform or the patch changes.
| 2847 | |
| 2848 | |
| 2849 | class TransformedPatchPath(TransformedPath): |
| 2850 | """ |
| 2851 | A `TransformedPatchPath` caches a non-affine transformed copy of the |
| 2852 | `~.patches.Patch`. This cached copy is automatically updated when the |
| 2853 | non-affine part of the transform or the patch changes. |
| 2854 | """ |
| 2855 | |
| 2856 | def __init__(self, patch): |
| 2857 | """ |
| 2858 | Parameters |
| 2859 | ---------- |
| 2860 | patch : `~.patches.Patch` |
| 2861 | """ |
| 2862 | # Defer to TransformedPath.__init__. |
| 2863 | super().__init__(patch.get_path(), patch.get_transform()) |
| 2864 | self._patch = patch |
| 2865 | |
| 2866 | def _revalidate(self): |
| 2867 | patch_path = self._patch.get_path() |
| 2868 | # Force invalidation if the patch path changed; otherwise, let base |
| 2869 | # class check invalidation. |
| 2870 | if patch_path != self._path: |
| 2871 | self._path = patch_path |
| 2872 | self._transformed_path = None |
| 2873 | super()._revalidate() |
| 2874 | |
| 2875 | |
| 2876 | def _nonsingular(vmin, vmax, expander=0.001, tiny=1e-15, increasing=True): |
no outgoing calls
no test coverage detected
searching dependent graphs…