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

Method drawElementInfo

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

For debugging this will make the elements show their info. The css flag "showOrigin" defines if the origin marker of an element is drawn. Collect the (e, origin), so we can later draw all info, after the main drawing has been done.

(self, e, origin)

Source from the content-addressed store, hash-verified

444 context.rect(x-ml, y+e.h, ml+e.w+mr, max(1,mt))
445
446 def drawElementInfo(self, e, origin):
447 """For debugging this will make the elements show their info. The css
448 flag "showOrigin" defines if the origin marker of an element is
449 drawn. Collect the (e, origin), so we can later draw all info, after
450 the main drawing has been done."""
451 if not e.eId in self.elementsNeedingInfo:
452 self.elementsNeedingInfo[e.eId] = (e, origin)
453
454 # Drawing outside rotation / scaling mode, so the origin of
455 # the element is visible.
456 self.drawElementOrigin(e, origin)
457
458 def _drawElementsNeedingInfo(self, e):
459 b = self.b

Callers 15

drawMetaMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
build_htmlMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
build_htmlMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45

Calls 1

drawElementOriginMethod · 0.95

Tested by

no test coverage detected