Default drawing method just drawing the frame. Probably will be redefined by inheriting element classes.
(self, view, origin=ORIGIN, **kwargs)
| 70 | self.labelSize = labelSize # If undefined, then don't draw labels. |
| 71 | |
| 72 | def build(self, view, origin=ORIGIN, **kwargs): |
| 73 | """Default drawing method just drawing the frame. Probably will be |
| 74 | redefined by inheriting element classes.""" |
| 75 | c = self.context |
| 76 | p = pointOffset(self.origin, origin) |
| 77 | p = self._applyScale(view, p) |
| 78 | p = self._applyAlignment(p) # Ignore z-axis for now. |
| 79 | self.buildFrame(view, p) # Draw optional background fill, frame or borders. |
| 80 | |
| 81 | # Let the view draw frame info for debugging, in case view.showFrame == True |
| 82 | view.drawElementFrame(self, p) |
| 83 | # Draw that actual content of the element by stacked specimen rectangles. |
| 84 | self.drawStacked(view, p, **kwargs) |
| 85 | self._restoreScale(view) |
| 86 | view.drawElementInfo(self, origin) # Depends on flag 'view.showElementInfo' |
| 87 | |
| 88 | def getText(self, tag, cnt=None, charCnt=None): |
| 89 | """If the tag type of text is in self.words, then take a random choice |
nothing calls this directly
no test coverage detected