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

Method _restoreRotation

Lib/pagebot/elements/element.py:4717–4721  ·  view source on GitHub ↗

Reset graphics state from rotation mode.

(self, view, p)

Source from the content-addressed store, hash-verified

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."""
4719 if self.angle:
4720 px, py, _ = point3D(p)
4721 self.view.context.rotate(-self.angle, center=(px+self.rx, py+self.ry))
4722
4723 def _applyScale(self, view, p):
4724 """Internal method to apply the scale, if both *self.scaleX* and

Callers 7

restoreMethod · 0.95
buildMethod · 0.80
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