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

Method getPosition

Lib/pagebot/elements/element.py:724–731  ·  view source on GitHub ↗

Applies various offsets and transformations to determine final coordinates at which to place an element on a page.

(self, view, origin)

Source from the content-addressed store, hash-verified

722 e.prepare_flat(view)
723
724 def getPosition(self, view, origin):
725 """Applies various offsets and transformations to determine final
726 coordinates at which to place an element on a page."""
727 p = pointOffset(self.origin, origin)
728 self._applyScale(view, p)
729 self._applyAlignment(p)
730 self._applyRotation(view, p)
731 return p
732
733 def build(self, view, origin=ORIGIN, **kwargs):
734 """Default drawing method just drawing the frame. Probably will be

Callers 7

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

Calls 4

_applyScaleMethod · 0.95
_applyAlignmentMethod · 0.95
_applyRotationMethod · 0.95
pointOffsetFunction · 0.90

Tested by

no test coverage detected