(self, code: list[str])
| 443 | self._draw: T_ImageDraw |
| 444 | |
| 445 | def _init(self, code: list[str]) -> None: |
| 446 | if ImageDraw is None: |
| 447 | raise RuntimeError("Pillow not found. Cannot create image.") |
| 448 | if len(code) != 1: |
| 449 | raise NotImplementedError("Only one line of code is supported") |
| 450 | line = code[0] |
| 451 | width, height = self.calculate_size(len(line), 1) |
| 452 | size = (int(mm2px(width, self.dpi)), int(mm2px(height, self.dpi))) |
| 453 | self._image = Image.new(self.mode, size, self.background) |
| 454 | self._draw = ImageDraw.Draw(self._image) |
| 455 | |
| 456 | def _paint_module(self, xpos: float, ypos: float, width: float, color): |
| 457 | size = [ |
nothing calls this directly
no test coverage detected