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

Method build_drawBot

Lib/pagebot/elements/views/mapview.py:168–186  ·  view source on GitHub ↗

This method is called if the view is used as a placable element inside another element, such as a Page or Template.

(self, view, origin, **kwargs)

Source from the content-addressed store, hash-verified

166 # The context-methods are used in case the view itself is placed in a layout.
167
168 def build_drawBot(self, view, origin, **kwargs):
169 """This method is called if the view is used as a placable element
170 inside another element, such as a Page or Template. """
171 p = pointOffset(self.origin, origin)
172 p = self._applyScale(view, p)
173 px, py, _ = p = self._applyAlignment(p) # Ignore z-axis for now.
174
175 if self.drawBefore is not None: # Call if defined
176 self.drawBefore(self, view, p)
177
178 self.drawElementFrame(view, p) # In case the view itself is used on a page.
179 for page in self.elements:
180 page.build(view, p, **kwargs)
181
182 if self.drawAfter is not None: # Call if defined
183 self.drawAfter(self, view, p)
184
185 self._restoreScale(view)
186 #view.drawElementInfo(self, origin)
187
188 build_flat = build_drawBot
189

Callers

nothing calls this directly

Calls 6

drawElementFrameMethod · 0.95
pointOffsetFunction · 0.90
_applyScaleMethod · 0.80
_applyAlignmentMethod · 0.80
_restoreScaleMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected