Add a rotation (in degrees) around the point (x, y) in place. Returns *self*, so this method can easily be chained with more calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate` and :meth:`scale`.
(self, x, y, degrees)
| 2073 | return self.translate(-x, -y).rotate(theta).translate(x, y) |
| 2074 | |
| 2075 | def rotate_deg_around(self, x, y, degrees): |
| 2076 | """ |
| 2077 | Add a rotation (in degrees) around the point (x, y) in place. |
| 2078 | |
| 2079 | Returns *self*, so this method can easily be chained with more |
| 2080 | calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate` |
| 2081 | and :meth:`scale`. |
| 2082 | """ |
| 2083 | # Cast to float to avoid wraparound issues with uint8's |
| 2084 | x, y = float(x), float(y) |
| 2085 | return self.translate(-x, -y).rotate_deg(degrees).translate(x, y) |
| 2086 | |
| 2087 | def translate(self, tx, ty): |
| 2088 | """ |