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

Method _restoreScale

Lib/pagebot/elements/element.py:4742–4751  ·  view source on GitHub ↗

Reset graphics state from svaed scale mode. Make sure to match the call of self._applyScale. If one of (self.scaleX, self.scaleY, self.scaleZ) is not 0 or 1, then do the restore.

(self, view)

Source from the content-addressed store, hash-verified

4740 return p
4741
4742 def _restoreScale(self, view):
4743 """Reset graphics state from svaed scale mode. Make sure to match the
4744 call of self._applyScale. If one of (self.scaleX, self.scaleY,
4745 self.scaleZ) is not 0 or 1, then do the restore."""
4746 sx = self.scaleX
4747 sy = self.scaleY
4748 sz = self.scaleZ
4749 # Make sure these are value scale values.
4750 if sx and sy and sz and (sx != 1 or sy != 1 or sz != 1):
4751 self.view.context.restore()
4752
4753 # S P E L L C H E C K
4754

Callers 15

restoreMethod · 0.95
buildMethod · 0.80
buildMethod · 0.80
buildMethod · 0.80
buildMethod · 0.80
build_htmlMethod · 0.80
buildMethod · 0.80
buildMethod · 0.80
buildMethod · 0.80
build_htmlMethod · 0.80
buildMethod · 0.80
buildMethod · 0.80

Calls 1

restoreMethod · 0.45

Tested by

no test coverage detected