If self.showFrame and e is a page, or if e.showFrame == True, then draw the frame of the element.
(self, e, origin)
| 610 | # D R A W I N G E L E M E N T |
| 611 | |
| 612 | def drawElementFrame(self, e, origin): |
| 613 | """If self.showFrame and e is a page, or if e.showFrame == True, then draw |
| 614 | the frame of the element.""" |
| 615 | if (self.showFrame and e.isPage) or e.showFrame: |
| 616 | x = origin[0] |
| 617 | y = origin[1] |
| 618 | mt, mr, mb, ml = e.margin |
| 619 | self.context.fill(color(random(), random(), random(), 0.3)) |
| 620 | self.context.rect(x-ml, y, max(2,ml), e.h) |
| 621 | self.context.rect(x+e.w, y, max(1,mr), e.h) |
| 622 | self.context.rect(x-ml, y-mb, ml+e.w+mr, max(1,mb)) |
| 623 | self.context.rect(x-ml, y+e.h, ml+e.w+mr, max(1,mt)) |
| 624 | |
| 625 | def drawElementInfo(self, e, origin): |
| 626 | """For debugging this will make the elements show their info. |
no test coverage detected