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

Method build

Lib/pagebot/elements/variablefonts/animationframe.py:62–77  ·  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

60 self.phases = phases or {} # Dictionary for phasing values depending on frame index.
61
62 def build(self, view, origin=ORIGIN, **kwargs):
63 """Default drawing method just drawing the frame. Probably will be
64 redefined by inheriting element classes."""
65 c = self.context
66 p = pointOffset(self.origin, origin)
67 p = self._applyScale(view, p)
68 p = self._applyAlignment(p) # Ignore z-axis for now.
69
70 self.buildFrame(view, p) # Draw optional background fill, frame or borders.
71
72 # Let the view draw frame info for debugging, in case view.showFrame == True
73 view.drawElementFrame(self, p)
74 # Draw that actual content of the element by stacked specimen rectangles.
75 self.drawAnimatedFrame(view, p, **kwargs)
76 self._restoreScale(view)
77 view.drawElementInfo(self, origin) # Depends on flag 'view.showElementInfo'
78
79 def drawAnimatedFrame(self, view, origin, **kwargs):
80 """Draw the content of the element, responding to size, styles, font

Callers

nothing calls this directly

Calls 8

drawAnimatedFrameMethod · 0.95
pointOffsetFunction · 0.90
_applyScaleMethod · 0.80
_applyAlignmentMethod · 0.80
buildFrameMethod · 0.80
_restoreScaleMethod · 0.80
drawElementFrameMethod · 0.45
drawElementInfoMethod · 0.45

Tested by

no test coverage detected