MCPcopy Create free account
hub / github.com/PageBot/PageBot / _applyRotation

Method _applyRotation

Lib/pagebot/elements/element.py:4711–4715  ·  view source on GitHub ↗

Apply the rotation for angle, where (mx, my) is the rotation center.

(self, view, p)

Source from the content-addressed store, hash-verified

4709 return px, py, pz
4710
4711 def _applyRotation(self, view, p):
4712 """Apply the rotation for angle, where (mx, my) is the rotation center."""
4713 if self.angle:
4714 px, py, _ = point3D(p)
4715 self.view.context.rotate(self.angle, center=(px+self.rx, py+self.ry))
4716
4717 def _restoreRotation(self, view, p):
4718 """Reset graphics state from rotation mode."""

Callers 6

getPositionMethod · 0.95
buildMethod · 0.80
buildMethod · 0.80
buildMethod · 0.80
buildMethod · 0.80
buildMethod · 0.80

Calls 2

point3DFunction · 0.90
rotateMethod · 0.45

Tested by

no test coverage detected