(self, xpos: float, ypos: float, width: float, color)
| 454 | self._draw = ImageDraw.Draw(self._image) |
| 455 | |
| 456 | def _paint_module(self, xpos: float, ypos: float, width: float, color): |
| 457 | size = [ |
| 458 | (mm2px(xpos, self.dpi), mm2px(ypos, self.dpi)), |
| 459 | ( |
| 460 | mm2px(xpos + width, self.dpi) - 1, |
| 461 | mm2px(ypos + self.module_height, self.dpi), |
| 462 | ), |
| 463 | ] |
| 464 | self._draw.rectangle(size, outline=color, fill=color) |
| 465 | |
| 466 | def _paint_text(self, xpos, ypos): |
| 467 | assert ImageFont is not None |