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

Method build_drawBot

Lib/pagebot/elements/views/pageview.py:1265–1286  ·  view source on GitHub ↗

This method is called if the view is used as a placeable element inside another element, such as a Page or Template. TODO: check OS, check if DrawBot is installed.

(self, view, origin, **kwargs)

Source from the content-addressed store, hash-verified

1263 # The context-methods are used, in case the view itself is placed in a layout.
1264
1265 def build_drawBot(self, view, origin, **kwargs):
1266 """This method is called if the view is used as a placeable element
1267 inside another element, such as a Page or Template.
1268
1269 TODO: check OS, check if DrawBot is installed.
1270 """
1271 p = pointOffset(self.origin, origin)
1272 p = self._applyScale(view, p)
1273 px, py, _ = p = self._applyAlignment(p) # Ignore z-axis for now.
1274
1275 if self.drawBefore is not None: # Call if defined
1276 self.drawBefore(self, view, p)
1277
1278 self.drawElementFrame(view, p) # In case the view itself is used on a page.
1279 for page in self.elements:
1280 page.build(view, p, **kwargs)
1281
1282 if self.drawAfter is not None: # Call if defined
1283 self.drawAfter(self, view, p)
1284
1285 self._restoreScale(view)
1286 #view.drawElementInfo(self, origin)
1287
1288 build_flat = build_drawBot
1289

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