A transformation that applies rotation by *theta*, after transform by *trans_shift*.
| 2724 | |
| 2725 | |
| 2726 | class _ScaledRotation(Affine2DBase): |
| 2727 | """ |
| 2728 | A transformation that applies rotation by *theta*, after transform by *trans_shift*. |
| 2729 | """ |
| 2730 | def __init__(self, theta, trans_shift): |
| 2731 | super().__init__() |
| 2732 | self._theta = theta |
| 2733 | self._trans_shift = trans_shift |
| 2734 | self._mtx = None |
| 2735 | |
| 2736 | def get_matrix(self): |
| 2737 | if self._invalid: |
| 2738 | transformed_coords = self._trans_shift.transform([[self._theta, 0]])[0] |
| 2739 | adjusted_theta = transformed_coords[0] |
| 2740 | rotation = Affine2D().rotate(adjusted_theta) |
| 2741 | self._mtx = rotation.get_matrix() |
| 2742 | return self._mtx |
| 2743 | |
| 2744 | |
| 2745 | class AffineDeltaTransform(Affine2DBase): |
no outgoing calls
searching dependent graphs…