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

Method build

Lib/pagebot/elements/variablefonts/fittowidth.py:95–104  ·  view source on GitHub ↗

Default drawing method just drawing the frame. Probably will be redefined by inheriting element classes.

(self, view, origin=ORIGIN, **kwargs)

Source from the content-addressed store, hash-verified

93
94
95 def build(self, view, origin=ORIGIN, **kwargs):
96 """Default drawing method just drawing the frame.
97 Probably will be redefined by inheriting element classes."""
98 p = pointOffset(self.origin, origin)
99 p = self._applyScale(view, p)
100 px, py, _ = p = self._applyAlignment(p) # Ignore z-axis for now.
101 self.draw(view, p)
102 self.buildChildElements(view, p, **kwargs)
103 self._restoreScale(view)
104 view.drawElementInfo(self, origin) # Depends on flag 'view.showElementInfo'
105
106 def draw(self, view, p):
107 if not self.show:

Callers

nothing calls this directly

Calls 7

drawMethod · 0.95
pointOffsetFunction · 0.90
_applyScaleMethod · 0.80
_applyAlignmentMethod · 0.80
buildChildElementsMethod · 0.80
_restoreScaleMethod · 0.80
drawElementInfoMethod · 0.45

Tested by

no test coverage detected