Renders Pagebot FlatBuilder shape to a Flat shape.
(self)
| 1011 | return self.b.rgb(*to255(c.rgb)) |
| 1012 | |
| 1013 | def _getShape(self): |
| 1014 | """Renders Pagebot FlatBuilder shape to a Flat shape.""" |
| 1015 | # TODO: Move inside FlatBezierpath. |
| 1016 | #if self._fill is noColor and self._stroke is noColor: |
| 1017 | # self._fill = whiteColor |
| 1018 | shape = self.b.shape() |
| 1019 | |
| 1020 | if self._fill and self._fill != noColor: |
| 1021 | shape.fill(self.getFlatRGB(self._fill)) |
| 1022 | else: |
| 1023 | shape.nofill() |
| 1024 | |
| 1025 | if self._stroke and self._stroke != noColor: |
| 1026 | shape.stroke(self.getFlatRGB(self._stroke)).width(self._strokeWidth) |
| 1027 | else: |
| 1028 | shape.nostroke() |
| 1029 | |
| 1030 | return shape |
| 1031 | |
| 1032 | def rect(self, x, y, w, h): |
| 1033 | """Calculates rectangle points by combining (x, y) with width and |
no test coverage detected